Remove explicit stack size from api-test#954
Merged
Conversation
Let it overflow.
When compiling with MSVC (that includes ClangCL) it defaults to 1MB, which means our default of 1MB in the interpreter is too large to detect actual overflow. When compiling with MinGW GCC/Clang it defaults to 2MB. Set it to 8MB like Linux for some consistency.
Contributor
Author
|
@bnoordhuis PTAL. This one went deeper than I thought 😅 This should unblock the meson build. Also TIL a good number of things :-) For future reference: The exit code was -1073741571. Then, I won't deny ChatGPT helped me figure out why that code was relevant: 0xC00000FD in hexadecimal indicates a Stack Overflow Exception (STATUS_STACK_OVERFLOW). |
7 tasks
bnoordhuis
reviewed
Mar 7, 2025
| if(MSVC) | ||
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8388608") | ||
| else() | ||
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,8388608") |
Contributor
There was a problem hiding this comment.
Does changing CMAKE_EXE_LINKER_FLAGS affects downstream projects?
Contributor
Author
There was a problem hiding this comment.
AFAIK it only affects this one, but all targets. Since we likely want this on any exe we create from this project I went with the general flag rather than the target specific one.
bnoordhuis
approved these changes
Mar 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let it overflow.