Skip to content

Conversation

@Sonicadvance1
Copy link
Member

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.

This was a nasty race condition where each thread could be accessing the
DRM cache at any given moment. Move it over to a per thread object that
is only allocated once it gets used.

Also removes an `atexit` registration that contributes to crashing on
exit.
…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`.
@Sonicadvance1
Copy link
Member Author

Looks like the bash implementation doesn't work. I don't know bash well enough to know what's wrong. 🤷

Comment on lines 240 to 244
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants