https://bugs.llvm.org/show_bug.cgi?id=41973
Bug ID: 41973
Summary: Computed goto and -ftest-coverage -fprofile-arcs
causes segfault.
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: bmo...@google.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
It looks like the combination of computed goto and -ftest-coverage
-fprofile-arcs is causing segfaults in the compiled code, starting with r359906
(and then the issue went away when r359906 was rolled back as r359912, and
returned when it was rolled forward again as r359919).
My suspicion is that r359906 is not at fault, but is simply exposing an
existing issue in the coverage code. (I base this suspicion on the fact that
r359906 exposed a number of bugs elsewhere in our own codebase.)
This can be reproduced with this small example:
----
int main(int argc, char *argv[]) {
void* ops[2] = {&&DISP_TWO, &&DISP_DONE};
void** op = ops;
goto **op;
DISP_DONE:
goto out;
DISP_TWO:
goto **(++op);
out:
return 0;
}
----
This works when compiled normally, but segfaults when built with
-ftest-coverage -fprofile-arcs, in assembly assigned to the line with the
DISP_TWO label.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs