[LLVMbugs] [Bug 3823] New: llvm-gcc segmentation fault during build of libstdc++
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Mar 16 15:59:19 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3823
Summary: llvm-gcc segmentation fault during build of libstdc++
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
Since a while I am seeing conftest segmentation fault in syslog, and I finally
tracked down the reason to the libstdc++ build of llvm-gcc (both 32 -and 64-bit
mode, hence 2 segfaults).
Everything seems to proceed normally, and I do get a working llvm-gcc, but this
segfault shouldn't be happening.
I tried compiling the failing testcase with gcc, and it fails there as well
(see below).
Mar 16 23:23:59 debian kernel: [47931.114089] conftest[22732]: segfault at 80
ip 00002ae820d67c2a sp 00007fff89f88d40 error 4 in
+libc-2.9.so[2ae820d3d000+149000]
Mar 16 23:24:27 debian kernel: [47959.425016] conftest[1497]: segfault at 40 ip
00000000555bfb6a sp 00000000ff945910 error 4 in
+libc-2.9.so[5559c000+151000]
llvm-svn/obj42/x86_64-unknown-linux-gnu/32/libstdc++-v3/config.log:
configure:5712: checking for unistd.h
configure:5728: /home/edwin/llvm-svn/obj42/./gcc/xgcc
-B/home/edwin/llvm-svn/obj42/./gcc/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/bin/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/lib/ -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/include -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/sys-include
-m32 -c -O2 -g -O2 conftest.c >&5
configure:5734: $? = 0
configure:5738: test -z
|| test ! -s conftest.err
configure:5741: $? = 0
configure:5744: test -s conftest.o
configure:5747: $? = 0
configure:5758: result: yes
configure:5881: /home/edwin/llvm-svn/obj42/./gcc/xgcc
-B/home/edwin/llvm-svn/obj42/./gcc/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/bin/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/lib/ -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/include -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/sys-include
-m32 -o conftest -O2 -g -O2 conftest.c >&5
configure:5884: $? = 0
configure:5886: ./conftest
../../../../llvm-gcc4.2/libstdc++-v3/configure: line 5887: 13888 Segmentation
fault ./conftest$ac_exeext
configure:5889: $? = 139
configure: program exited with status 139
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| extern "C" void exit (int) throw ();
| #endif
| #define _GLIBCXX_HOSTED 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
|
| #define _GNU_SOURCE 1
| #include <locale.h>
| #include <string.h>
| #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
| extern __typeof(newlocale) __newlocale;
| extern __typeof(duplocale) __duplocale;
| extern __typeof(strcoll_l) __strcoll_l;
| #endif
| int main()
| {
| const char __one[] = "Äuglein Augmen";
| const char __two[] = "Äuglein";
| int i;
| int j;
| __locale_t loc;
| __locale_t loc_dup;
| loc = __newlocale(1 << LC_ALL, "de_DE", 0);
| loc_dup = __duplocale(loc);
| i = __strcoll_l(__one, __two, loc);
| j = __strcoll_l(__one, __two, loc_dup);
| return 0;
| }
|
llvm-svn/obj42/x86_64-unknown-linux-gnu/libstdc++-v3/config.log:
configure:5881: /home/edwin/llvm-svn/obj42/./gcc/xgcc
-B/home/edwin/llvm-svn/obj42/./gcc/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/bin/
-B/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/lib/ -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/include -isystem
/home/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/sys-include -o
conftest -O2 -g -O2 conftest.c >&5
configure:5884: $? = 0
configure:5886: ./conftest
/home/edwin/llvm-svn/llvm-gcc4.2/libstdc++-v3/configure: line 5887: 3251
Segmentation fault ./conftest$ac_exeext
configure:5889: $? = 139
configure: program exited with status 139
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| extern "C" void exit (int) throw ();
| #endif
| #define _GLIBCXX_HOSTED 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
|
| #define _GNU_SOURCE 1
| #include <locale.h>
| #include <string.h>
| #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
| extern __typeof(newlocale) __newlocale;
| extern __typeof(duplocale) __duplocale;
| extern __typeof(strcoll_l) __strcoll_l;
| #endif
| int main()
| {
| const char __one[] = "Äuglein Augmen";
| const char __two[] = "Äuglein";
| int i;
| int j;
| __locale_t loc;
| __locale_t loc_dup;
| loc = __newlocale(1 << LC_ALL, "de_DE", 0);
| loc_dup = __duplocale(loc);
| i = __strcoll_l(__one, __two, loc);
| j = __strcoll_l(__one, __two, loc_dup);
| return 0;
| }
|
Problem is that loc is NULL (I don't have de_DE locale), and then duplocale
segfaults. This only occurs when bootstrapping llvm-gcc, no such segmentation
fault occurs when bootstrapping gcc-4.4.
Is this a bug in configure, or something enabled more locales than it was
supposed to?
--
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