You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C programs usually have a small stack size by default, and https://www.php.net/fiber is also low for the few use cases of fibers
Applications that override $depth in simdjson_decode to a much larger value may have a stack overflow and crash when they actually attempt to parse json (e.g. user-provided) of that depth by calling simdjson_decode.
(PHP's json_decode currently uses a parser based on bison, so the emitted code to convert json to php values doesn't actually use the C stack recursively, and doesn't have this problem)
The current default depth of 512 is fine (2097152 bytes of data), but the current max depth is only chosen to avoid running out of C memory when allocating buffers or allocating more than needed. It should be much lower
C programs usually have a small stack size by default, and https://www.php.net/fiber is also low for the few use cases of fibers
Applications that override $depth in simdjson_decode to a much larger value may have a stack overflow and crash when they actually attempt to parse json (e.g. user-provided) of that depth by calling simdjson_decode.
The current default depth of 512 is fine (2097152 bytes of data), but the current max depth is only chosen to avoid running out of C memory when allocating buffers or allocating more than needed. It should be much lower
The text was updated successfully, but these errors were encountered: