tinyusdz icon indicating copy to clipboard operation
tinyusdz copied to clipboard

[TODO] Rewrite recursive function call with for-loop

Open syoyo opened this issue 2 years ago • 1 comments

There are some recursive function call in TinyUSDZ, for example:

https://github.com/syoyo/tinyusdz/blob/b158c289c964c9b107dc7530fbf45f3db4387d88/src/usdc-reader.cc#L1339

To avoid potential stack overflow, rewrite it to for-loop (For security, for running TinyUSDZ on embedded(wasm) environment)

syoyo avatar Sep 17 '22 13:09 syoyo

The stackoverflow also happens in crate-reader.cc::!BuildDecompressedPathsImpl when input USD scene has too many USD Prims(too deep PathIndex hierarchy)

syoyo avatar Sep 25 '23 17:09 syoyo