-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Exceptions constructed from std::string bypass catch handlers on Clang 18 #94292
Comments
Don't see it here, on macOS 13.6.7 (M1):
|
Thank you for looking into this! I see now that the problem depends on the compiler flags.
The problem does not reproduce when I remove the
This is still surprising, because
The compilation works when I'm running it with all those variables set.
But it doesn't work if all the same values are specified directly on the command-line:
|
BTW the culprit is the flag
Removing that particular search path fixes the problem:
|
I don't know now if this is still a bug in LLVM or it is my ignorance about the proper ways to pass flag values from the compiler front-end to the linker. It would still be nice to understand why this happens, but it's not a critical problem. Thanks! |
I see this problem, too. It only happens when using |
Exceptions constructed from an
std::string
bypass catch handlers and terminate the program. The same exception constructed from a string literal behaves normally. The following program compiled with Clang 14 catches both exceptions. However, on Clang 18 the "dynamic" version terminates the program with the following message:Working compiler:
Compiler that fails:
The text was updated successfully, but these errors were encountered: