-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Lower marshal.c
recursion depth limit for WASI
#98925
Comments
brettcannon
added
type-bug
An unexpected behavior, bug, or error
3.11
only security fixes
3.12
bugs and security fixes
OS-wasi
labels
Oct 31, 2022
FYI this was detected via https://github.com/tiran/cpython-wasm-test/actions/workflows/wasi.yml . |
brettcannon
added a commit
to brettcannon/cpython
that referenced
this issue
Nov 1, 2022
For (in-development) wasmtime 2.0, the stack depth cost is 6% higher. As the default is 2000 and Windows is 1000, split the difference and choose 1500 for WASI.
miss-islington
pushed a commit
that referenced
this issue
Nov 1, 2022
For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack. As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 1, 2022
For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack. As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe. (cherry picked from commit 9711265) Co-authored-by: Brett Cannon <brett@python.org>
brettcannon
added a commit
that referenced
this issue
Nov 1, 2022
…H-98979) * gh-98925: Lower marshal recursion depth for WASI (GH-98938) For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack. As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe. (cherry picked from commit 9711265) Co-authored-by: Brett Cannon <brett@python.org>
39 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on bytecodealliance/wasmtime#5152 it looks like the stack depth specified in:
cpython/Python/marshal.c
Line 38 in 4702552
and:
cpython/Lib/test/test_marshal.py
Line 264 in 7644935
are too high for wasmtime 2.0 (in development). We should drop it to either 1000 to match Windows or something like 1500 if we want a higher, but still acceptable, limit.
The text was updated successfully, but these errors were encountered: