-
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
*** Break *** segmentation violation in case of compilation errors in unnamed macros #8367
Comments
Hi, |
Hi,
That solves the problem. Thank you very much.
Best,
Sakib
…On Tue, Jun 8, 2021 at 12:47 PM Enrico Guiraud ***@***.***> wrote:
Hi,
the segmentation fault is terrible ( ping @Axel-Naumann
<https://github.com/Axel-Naumann> ) but the code is not valid C++: you
need for(int i=0; i<12; i++) instead of for(i=0; i<12; i++). Does that
fix the crash?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8367 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMS4Q3F6PHG63CCZNBXWKTTRZCTBANCNFSM46I5PYFQ>
.
|
The segfault itself seems to be a problem in how the interpreter handles unnamed macros: // foo.C
{
for(i=0; i < 0;); // the second usage of `i` is necessary to get a segfault
} yields:
while // foo.C
void foo() {
for(i=0; i < 0;);
} yields the expected compilation errors:
|
Side note, it crashes with current ROOT master, but does not crash with current cling standalone master (debug mode).
|
@devajithvs do you happen to understand why? |
Same thing observed here: https://its.cern.ch/jira/browse/ROOT-10309 |
It only happens for this specific case |
Describe the bug
tried to execute a code, crashes
Expected behavior
To Reproduce
Steps to reproduce the behavior:
1.
Setup
Additional context
The text was updated successfully, but these errors were encountered: