From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1987 invoked by alias); 23 Dec 2009 08:46:22 -0000 Received: (qmail 1943 invoked by uid 48); 23 Dec 2009 08:46:07 -0000 Date: Wed, 23 Dec 2009 08:46:00 -0000 Subject: [Bug bootstrap/42474] New: SIGSEGV in linemap_lookup X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "andrewbachmann at yahoo dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg02221.txt.bz2 While building gcc from tag gcc_4_4_1_release on Haiku, a segfault occurred several times in various files, in the same location in linemap_lookup: mn = set->cache; The set variable is NULL. I changed linemap_lookup to return NULL when the set is NULL and this problem went away. I also experienced this SIGSEGV while using gcc 4.3.3 on Haiku. I will try investigating more recent gcc versions when I get a chance. /c/develop/gcc-4-4-1/host-i586-pc-haiku/gcc/xgcc -v Using built-in specs. Target: i586-pc-haiku Configured with: ./configure --prefix=/c/develop/gcc_4-4-1_java --enable-languages=c,c++,java --disable-nls --disable-shared --target=i586-pc-haiku Thread model: single gcc version 4.4.1 (GCC) Haiku revision 34251 expected behavior: compile without errors actual behavior: recurring SIGSEGV in linemap_lookup /c/develop/gcc-4-4-1/host-i586-pc-haiku/gcc/xgcc -shared-libgcc -B/c/develop/gcc-4-4-1/host-i586-pc-haiku/gcc -nostdinc++ -L/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/src -L/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/src/.libs -B/c/develop/gcc_4-4-1_java/i586-pc-haiku/bin/ -B/c/develop/gcc_4-4-1_java/i586-pc-haiku/lib/ -isystem /c/develop/gcc_4-4-1_java/i586-pc-haiku/include -isystem /c/develop/gcc_4-4-1_java/i586-pc-haiku/sys-include -x c++-header -O2 -g -I/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku -I/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/include -I/c/develop/gcc-4-4-1/libstdc++-v3/libsupc++ -O2 -g /c/develop/gcc-4-4-1/libstdc++-v3/include/precompiled/stdtr1c++.h -o i586-pc-haiku/bits/stdtr1c++.h.gch/O2g.gch /c/develop/gcc-4-4-1/host-i586-pc-haiku/gcc/xgcc -shared-libgcc -B/c/develop/gcc-4-4-1/host-i586-pc-haiku/gcc -nostdinc++ -L/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/src -L/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/src/.libs -B/c/develop/gcc_4-4-1_java/i586-pc-haiku/bin/ -B/c/develop/gcc_4-4-1_java/i586-pc-haiku/lib/ -isystem /c/develop/gcc_4-4-1_java/i586-pc-haiku/include -isystem /c/develop/gcc_4-4-1_java/i586-pc-haiku/sys-include -x c++-header -O2 -g -I/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/include/i586-pc-haiku -I/c/develop/gcc-4-4-1/i586-pc-haiku/libstdc++-v3/include -I/c/develop/gcc-4-4-1/libstdc++-v3/libsupc++ -O2 -g /c/develop/gcc-4-4-1/libstdc++-v3/include/precompiled/extc++.h -o i586-pc-haiku/bits/extc++.h.gch/O2g.gch Thread 405300 caused an exception: Segment violation Program received signal SIGSEGV, Segmentation fault. linemap_lookup (set=0x2c9d828, line=73) at ../.././libcpp/line-map.c:276 276 mn = set->cache; linemap_lookup (set=0x2c9d828, line=73) at ../.././libcpp/line-map.c:276 276 mn = set->cache; (gdb) bt #0 linemap_lookup (set=0x2c9d828, line=73) at ../.././libcpp/line-map.c:276 #1 0x003fa1e9 in diagnostic_report_current_module (context=0xcd6520) at ../.././gcc/diagnostic.c:236 #2 0x002f64dd in cp_diagnostic_starter (context=0xcd6520, diagnostic=0x7ffec714) at ../.././gcc/cp/error.c:2374 #3 0x003f9989 in diagnostic_report_diagnostic (context=0xcd6520, diagnostic=0x7ffec714) at ../.././gcc/diagnostic.c:403 #4 0x003f9c4d in internal_error (gmsgid=0x95a5e7 "%s") at ../.././gcc/diagnostic.c:658 #5 0x0058aa1f in crash_signal (signo=Variable "signo" is not available. ) at ../.././gcc/toplev.c:601 #6 0x7ffec838 in ?? () #7 0x008c5907 in comp_hashnodes (px=0xb80cc483, py=0x39) at internal.h:672 #8 0x7ffec794 in ?? () #9 0xb80cc483 in ?? () #10 0x00000039 in ?? () #11 0x000000b9 in ?? () #12 0x24548d00 in ?? () #13 0xc363cd04 in ?? () #14 0x008c123b in linemap_lookup (set=0xdb9dbfdc, line=2147404600) at ../.././libcpp/line-map.c:272 #15 0x02c9d828 in ?? () -- Summary: SIGSEGV in linemap_lookup Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andrewbachmann at yahoo dot com GCC build triplet: i586-pc-haiku GCC host triplet: i586-pc-haiku GCC target triplet: i586-pc-haiku http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42474