------- Comment #5 from edwintorok at gmail dot com 2008-06-13 13:37 ------- I have built with --enable-checking=yes (instead of all), because all was taking too long.
It looks like a value of a pointer is invalid. See the gdb session below. What should I do next to help debug the problem? Starting program: /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1plus -E -quiet -v -I/home/edwin/llvm-svn/llvm/include -I/home/edwin/llvm-svn/llvm/tools/clang/lib/Basic -I/home/edwin/llvm-svn/llvm/tools/clang/lib/Basic/../../include -MMD I.d -MF /home/edwin/llvm-svn/llvm/tools/clang/lib/Basic/Release/IdentifierTable.d.tmp -MP -MT /home/edwin/ll vm-svn/llvm/tools/clang/lib/Basic/Release/IdentifierTable.lo -MT /home/edwin/llvm-svn/llvm/tools/clang/lib/Basic/Release/IdentifierTable.o -MT /home/edwin/llvm-svn/llvm/tools/cla ng/lib/Basic/Release/IdentifierTable.d -D_GNU_SOURCE -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS IdentifierTable.cpp -o I.ii -mtune=generic -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -Winvalid-pch -fomit-frame-pointer -fno-exceptions -fno-rtti -O1 ignoring nonexistent directory "/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/edwin/llvm-svn/llvm/include /home/edwin/llvm-svn/llvm/tools/clang/lib/Basic /home/edwin/llvm-svn/llvm/tools/clang/lib/Basic/../../include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/x86_64-unknown-linux-gnu /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/backward /usr/local/include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include-fixed /usr/include End of search list. Program received signal SIGSEGV, Segmentation fault. 0x0000000000c111d3 in new_string_token (pfile=0x2ae4280, text=0x22745f323372 <Address 0x22745f323372 out of bounds>, len=2743223540) at ../../gcc-4.3.1/libcpp/macro.c:100 (gdb) bt #0 0x0000000000c111d3 in new_string_token (pfile=0x2ae4280, text=0x22745f323372 <Address 0x22745f323372 out of bounds>, len=2743223540) at ../../gcc-4.3.1/libcpp/macro.c:100 #1 0x0000000000c11cbb in stringify_arg (pfile=0x2ae4280, arg=0x2b439a0) at ../../gcc-4.3.1/libcpp/macro.c:434 #2 0x0000000000c12a61 in replace_args (pfile=0x2ae4280, node=0x7f8657b614a0, macro=0x7f8657a15140, args=0x2b439a0) at ../../gcc-4.3.1/libcpp/macro.c:921 #3 0x0000000000c12888 in enter_macro_context (pfile=0x2ae4280, node=0x7f8657b614a0, result=0x2ae4710) at ../../gcc-4.3.1/libcpp/macro.c:850 #4 0x0000000000c133e7 in cpp_get_token (pfile=0x2ae4280) at ../../gcc-4.3.1/libcpp/macro.c:1234 #5 0x00000000005a4a28 in preprocess_file (pfile=0x2ae4280) at ../../gcc-4.3.1/gcc/c-ppoutput.c:148 #6 0x00000000005a08a9 in c_common_init () at ../../gcc-4.3.1/gcc/c-opts.c:1244 #7 0x00000000004bf843 in cxx_init () at ../../gcc-4.3.1/gcc/cp/lex.c:421 #8 0x0000000000807698 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at ../../gcc-4.3.1/gcc/toplev.c:2123 #9 0x0000003cbb81e1a6 in __libc_start_main () from /lib/libc.so.6 #10 0x0000000000404269 in _start () (gdb) p text $1 = (unsigned char *) 0x22745f323372 <Address 0x22745f323372 out of bounds> (gdb) p len $2 = 2743223540 (gdb) up (gdb) p dest $3 = (unsigned char *) 0x2b47866 "" (gdb) p len $4 = 18446706190546257140 ^^^^^^^^^^^^^^^^ looks like a negative number to me (gdb) p pfile->u_buff $5 = (_cpp_buff *) 0x2b47850 432 len = dest - BUFF_FRONT (pfile->u_buff); 433 BUFF_FRONT (pfile->u_buff) = dest + 1; 434 return new_string_token (pfile, dest - len, len); (gdb) display arg->first[0] (gdb) b 433 Breakpoint 6 at 0xc11c8a: file ../../gcc-4.3.1/libcpp/macro.c, line 433. (gdb) cond 6 len>100000 (gdb) r ... Breakpoint 6, stringify_arg (pfile=0x2a0f280, arg=0x2a6e9a0) at ../../gcc-4.3.1/libcpp/macro.c:433 1: *arg->first[0] = {src_loc = 9522344, type = CPP_NAME, flags = 0 '\0', val = {node = 0x7f472c117020, source = 0x7f472c117020, str = {len = 739340320, text = 0x2a72512 "\"clang/ Basic/TokenKinds.def\""}, arg_no = 739340320, pragma = 739340320}} (gdb) p pfile->u_buff->cur $30 = (unsigned char *) 0x22745f323372 <Address 0x22745f323372 out of bounds> -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36524