Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO] Rewrite recursive function call with for-loop #19

Open
syoyo opened this issue Sep 17, 2022 · 1 comment
Open

[TODO] Rewrite recursive function call with for-loop #19

syoyo opened this issue Sep 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@syoyo
Copy link
Collaborator

syoyo commented Sep 17, 2022

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 syoyo added the enhancement New feature or request label Sep 17, 2022
@syoyo syoyo changed the title Rewrite recursive function call with for-loop [TODO] Rewrite recursive function call with for-loop Sep 17, 2022
@syoyo
Copy link
Collaborator Author

syoyo commented Sep 25, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant