llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

DEBUG output in InstructionCombining.cpp causing seg fault

Open JonPsson opened this issue 10 years ago • 0 comments

Bugzilla Link 25983
Version unspecified
OS Linux
Attachments clang input

Extended Description

InstructionCombining is outputting a new instruction to dbgs(), without the new instruction having been insterted into BB. The result is that an AssemblyWriter is created with a null TheModule pointer.

A seg fault is caused by the supplied test case.

run:

clang -cc1 -triple s390x-ibm-linux-gnu -S -disable-free -main-file-name ckd_alloc.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu z13 -target-linker-version 2.25 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -O3 -ferror-limit 19 -fmessage-length 0 -funroll-loops -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -mllvm -debug -o ckd_alloc.s -x ir ckd_alloc.bc

JonPsson avatar Dec 31 '15 16:12 JonPsson