Repository navigation
Fix UB due to dangling references in try/catch - #94
Conversation
|
LGTM. Waiting for CI to cycle (asuming it will :-) |
|
Can we get this in 1.73 please? |
|
@mgaunard Your changes look reasonable, but could you maybe add some tests that show asan fails before the PR? I have added asan to the CI and it currently did not find issues, and I have not come with a reproducer myself. |
|
I do not think I will have the time to do a proper one before tomorrow the deadline for boost 1.73. ASan is a tool that can help in finding bugs, it certainly cannot act as a control to check whether bugs are present or not, so I'm not sure what value you're expecting to get there. try_catch itself has no tests as-is. Clearly the "throw arg1" and "arg2 = true" sub-expressions don't exist anymore when f is called. I made it into a separate function returning another function to increase the chances of ASan detecting it. |
|
I'll have this merged. Let's deal with the test later. |
No description provided.