-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Interpreter: Crash with empty statement #17257
Comments
On macOS, with master, root quits without any error with |
Note that infinite loops are undefined behavior in C++ and LLVM will exploit this during optimization. As a very simplified explanation, because the loop has no side-effects and C++ guarantees that every statement must terminate, LLVM can just remove it (there is a famous blog post about LLVM "optimizing" an infinite loop, but I can't find it right now). I assume this leads to slightly broken code being emitted, for example that is missing a |
Relates to llvm/llvm-project#60622 |
Yes, that's the code example I was looking for! I though there was a well-written blog post about that somewhere, but might have been wrong... |
Thanks for the explanation. So this is maybe then a duplicate of #15537 and can be closed? (I still argue that it would be useful to fix this, to not lose your whole ROOT working session if you type something wrong by mistake at the prompt. Low priority of course.) |
Check duplicate issues.
Description
A silly
while(1) {;}
makes ROOT interpreter crash. It should instead hang or raise an error.Reproducer
See above
ROOT version
Installation method
Debug build
Operating system
Ubuntu 22
Additional context
Crash might be happening at similar place than #15537
The text was updated successfully, but these errors were encountered: