[LLVMbugs] [Bug 6790] New: segmentation failure in static initialization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 6 00:14:38 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6790
Summary: segmentation failure in static initialization
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: llvm-g++
AssignedTo: unassignedbugs at nondot.org
ReportedBy: victor.zverovich at googlemail.com
CC: llvmbugs at cs.uiuc.edu
The following test program compiled with llvm-g++ from 2.7 prerelease 1
terminates with a segmentation failure:
#include "llvm/Support/CommandLine.h"
static llvm::cl::opt<bool>
printStats("print-stats",
llvm::cl::desc("Print performance metrics and statistics"),
llvm::cl::Hidden);
int main() {}
Call stack:
#0 0x00000000 in ?? ()
#1 0x08054fac in __static_initialization_and_destruction_0 (__initialize_p=1,
__priority=65535) at /usr/local/src/llvm-2.7/lib/Support/Debug.cpp:41
#2 0x0805517e in global constructors keyed to Debug.cpp () at
/usr/local/src/llvm-2.7/lib/Support/Debug.cpp:128
#3 0x08076ae2 in __do_global_ctors_aux ()
#4 0x0807dc94 in _init ()
#5 0x08076999 in __libc_csu_init ()
#6 0x00297af4 in __libc_start_main (main=0x80481d0 <main>, argc=1,
ubp_av=0xbffff514, init=0x8076980 <__libc_csu_init>, fini=0x8076970
<__libc_csu_fini>,
rtld_fini=0x11dd20 <_dl_fini>, stack_end=0xbffff50c) at libc-start.c:179
#7 0x08048161 in _start () at ../sysdeps/i386/elf/start.S:119
The generated bitcode file is attached.
The following command is used to produce an executable:
llvm-g++ -use-gold-plugin test.bc
`/usr/local/src/llvm-2.7/install/debug/bin/llvm-config --ldflags --libs core`
-o test
Versions:
llvm-g++ (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2.7)
llvm version 2.7svn
Optimized build with assertions.
Built Apr 6 2010 (06:51:08).
Host: i386-pc-linux-gnu
Host CPU: yonah
The segmentation failure only occurs when the program uses debug LLVM libraries
(configured with --disable-optimized).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list