Ensure manage_exception_state uses correct TLS#324
Conversation
|
Wouldn't access through a Like so: manage_exception_state() {
exception_state_ = *(volatile __cxa_eh_globals *)__cxa_get_globals();
}
~manage_exception_state() {
*(volatile __cxa_eh_globals *)__cxa_get_globals() = exception_state_;
}
` |
|
ty |
|
This merge causes build failures on Linux: https://github.com/boostorg/boost/actions/runs/22891458318/job/66415405269 |
The problem is coming from the result of __cxa_get_globals() is being cached, casting the pointer to volatile doesn't prevent compiler to cache the pointer it self. |
|
@olk The volatile change breaks the code, can you merge this PR as-is? |
Solves #323