-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Assertion failed: (!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"), function SplitCriticalEdge #22342
Comments
The crash backtrace goes like this: #0 0x00000008060c93fa in thr_kill () from /lib/libc.so.7 |
It's invalid to split a critical edge (i.e. an edge from a block wiht multiple successors to a block with multiple predecessors), that starts at IndirectrBrinst. Index: LoopRotation.cpp--- LoopRotation.cpp (revision 229962)
I'm not sure this is 100% correct because I didn't analyze all the side-effects, but it's a start (among others, it passes clang test suite without complaining). Can you give it a shot and see the compiled executable is valid? I'll investigate further on this and ask for review once I'll be more confident |
r230058 should help. |
Extended Description
This is an assertion failure we encountered during the recent clang 3.5.0 ports exp-run, while building the radare2 port [1]:
Assertion failed: (!isa(TI) && "Cannot split critical edge from IndirectBrInst"), function SplitCriticalEdge, file /zpoudriere/jails/head-amd64-#195480 /usr/src/lib/clang/libllvmtransformutils/../../../contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp, line 148.
Stack dump:
0. Program arguments: /usr/bin/cc -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name json.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -gdwarf-2 -dwarf-column-info -coverage-file /wrkdirs/usr/ports/devel/radare2/work/radare2-0.9.6/shlr/sdb/src/json.o -resource-dir /usr/bin/../lib/clang/3.5.0 -dependency-file json.d -MT json.o -sys-header-deps -D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 -D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 -O2 -Wall -Wall -fdebug-compilation-dir /wrkdirs/usr/ports/devel/radare2/work/radare2-0.9.6/shlr/sdb/src -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -stack-protector 1 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o json.o -x c json.c
This also reproduces with trunk r224516, with assertions enabled. I have reduced this to a small test case, which I am attaching.
Compile with: clang -cc1 -triple x86_64-unknown-linux -S -O1 radare-json-reduced.c
[1] http://pb2.nyi.freebsd.org/data/head-amd64-#195480 -default/2014-12-12_23h17m02s/logs/errors/radare2-0.9.6.log
The text was updated successfully, but these errors were encountered: