[LLVMbugs] [Bug 23902] New: clang segfaults on undefined variable
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 19 21:49:45 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23902
Bug ID: 23902
Summary: clang segfaults on undefined variable
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: schopf.dan at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14498
--> https://llvm.org/bugs/attachment.cgi?id=14498&action=edit
associated run script
Compiling the following simple C program makes clang segfault:
#include <math.h>
#include <stdio.h>
int main() {
printf("%g", fabs(a));
return 0;
}
Declaring a solves the problem.
# clang -v test.c
clang version 3.7.0 (68aba8badebea3aee8c39002ac01fa12d978747e)
(883d498abf4db0e059a1250147e07f4e9c47d9e3)
Target: x86_64-pc-linux-gnu
Thread model: posix
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2
"/usr/bin/x86_64-pc-linux-gnu-clang-3.7" -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
test.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -resource-dir
/usr/bin/../lib/clang/3.7.0 -internal-isystem /usr/local/include
-internal-isystem /usr/bin/../lib/clang/3.7.0/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/daniel/workspace -ferror-limit 19 -fmessage-length 191 -mstackrealign
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/test-d1dd8d.o -x c test.c
clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target
x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/clang/3.7.0/include
/usr/include
End of search list.
x86_64-pc-linux-gnu-clang-3.7: error: unable to execute command: Segmentation
fault
x86_64-pc-linux-gnu-clang-3.7: error: clang frontend command failed due to
signal (use -v to see invocation)
clang version 3.7.0 (68aba8badebea3aee8c39002ac01fa12d978747e)
(883d498abf4db0e059a1250147e07f4e9c47d9e3)
Target: x86_64-pc-linux-gnu
Thread model: posix
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: PLEASE submit a bug report
to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source,
and associated run script.
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: /tmp/test-252330.c
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: /tmp/test-252330.sh
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg:
********************
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150620/8c898c3c/attachment.html>
More information about the llvm-bugs
mailing list