-
Notifications
You must be signed in to change notification settings - Fork 240
Github: Enforce expected amount of cxa_atexit registrations #5235
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
base: main
Are you sure you want to change the base?
Conversation
68faf8b to
7ce6dda
Compare
|
Looks like the bash implementation doesn't work. I don't know bash well enough to know what's wrong. 🤷 |
.github/workflows/ccpp.yml
Outdated
| COUNT = `llvm-objdump -D ${{runner.workspace}}/build/Bin/FEX | grep "__cxa_atexit@plt>$" | wc -l` | ||
| if [ $COUNT -eq 1 ] | ||
| echo "Expected 1 atexit handlers, found $COUNT" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| COUNT = `llvm-objdump -D ${{runner.workspace}}/build/Bin/FEX | grep "__cxa_atexit@plt>$" | wc -l` | |
| if [ $COUNT -eq 1 ] | |
| echo "Expected 1 atexit handlers, found $COUNT" | |
| exit 1 | |
| fi | |
| COUNT=`llvm-objdump -D ${{runner.workspace}}/build/Bin/FEX | grep '__cxa_atexit@plt>\\$' | wc -l` | |
| if [ $COUNT -ne 1 ] | |
| echo "Expected 1 atexit handlers, found $COUNT" | |
| exit 1 | |
| fi |
Something to this effect should be good. Otherwise you might need to open a terminal and run it once to find the last typo.
9e813de to
905df53
Compare
.github/workflows/ccpp.yml
Outdated
| run: mv ${{runner.workspace}}/build/Testing/Temporary/LastTest.log ${{runner.workspace}}/build/Testing/Temporary/LastTest_StructVerifier.log || true | ||
|
|
||
| - name: Ensure expected atexit registrations | ||
| working-directory: ${{runner.workspace}}/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| working-directory: ${{runner.workspace}}/build | |
| COUNT=$(llvm-objdump -D build/Bin/FEX | grep '__cxa_atexit@plt>\\$' | wc -l) | |
| [ "$COUNT" -eq 1 ] || { echo "Expected 1 atexit handlers, found $COUNT"; exit 1; } |
Slightly more concise. Also ensure to remove the redundant working-directory and shell directives (cc. #5243 and #5245)
6877ea1 to
ba52cbd
Compare
…ic object Just a little bit of late initialization to this pmr object using placement new. Removes an `atexit` registration that contributes to crashing on exit.
Even though we leak `Alloc64` on shutdown, that isn't good enough to avoid the `atexit` handler deallocating memory. So we need to use a raw pointer and leak it. Removes an `atexit` registration that contributes to crashing on exit.
These need to be late initialized because they allocate memory and register an `atexit` handler to deallocate. Removes an `atexit` registration that contributes to crashing on exit.
There is only one registration that I've not been able to track down why it happens, but it is something to do with std::ostream. This just ensures in CI that we don't ever register anymore atexit handlers so we don't regress on crashing on `exit`.
On top of the previous PRs.
There is only one registration that I've not been able to track down why
it happens, but it is something to do with std::ostream. This just
ensures in CI that we don't ever register anymore atexit handlers so we
don't regress on crashing on
exit.