retitle 472554 erlang: FTBFS with gcc-4.3 [i386, amd64]: erlc segfaults reassign 472554 gcc-4.3 4.3.0-2 thanks
On 3/25/08, Daniel Schepler <[EMAIL PROTECTED]> wrote: > > From my pbuilder build log on amd64, with gcc -> gcc-4.3: I've managed to reproduce the bug on i386 (I saw segmentation fault on SMP machine, but erlc failed to work on one-core processor too) with gcc-4.3. And I think that it's a bug in gcc-4.3. % dpkg-buildpackage -rfakeroot -us -uc -b <many lines of output, apparently irrelevant except the fact that all binaries are built with -O2 optimization> make[4]: Entering directory `/home/sergei/debian/gcc/erlang-12.b.1-dfsg/lib/parsetools/src' erlc -W +debug_info +warn_obsolete_guard -I/home/sergei/debian/gcc/erlang-12.b.1-dfsg/lib/stdlib/include -o../ebin yecc.erl make[4]: *** [../ebin/yecc.beam] Segmentation fault (core dumped) make[4]: Leaving directory `/home/sergei/debian/gcc/erlang-12.b.1-dfsg/lib/parsetools/src' make[3]: *** [opt] Error 2 make[3]: Leaving directory `/home/sergei/debian/gcc/erlang-12.b.1-dfsg/lib/parsetools' make[2]: *** [opt] Error 2 make[2]: Leaving directory `/home/sergei/debian/gcc/erlang-12.b.1-dfsg/lib' make[1]: *** [secondary_bootstrap_build] Error 2 make[1]: Leaving directory `/home/sergei/debian/gcc/erlang-12.b.1-dfsg' make: *** [build-stnd-stamp] Error 2 dpkg-buildpackage: failure: debian/rules build gave error exit status 2 % gdb -c lib/parsetools/src/core.13717 bin/x86_64-unknown-linux-gnu/beam.smp GNU gdb 6.7.1-debian Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libutil.so.1...done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /usr/lib/libsctp.so.1...done. Loaded symbols for /usr/lib/libsctp.so.1 Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4 Core was generated by `/home/sergei/debian/gcc/erlang-12.b.1-dfsg/bin/x86_64-unknown-linux-gnu/beam.sm'. Program terminated with signal 11, Segmentation fault. #0 0x080e2c70 in analyze_pattern (tb=0x557e0c6c, pattern=1445085745, mpi=0x56224180) at beam/erl_db_hash.c:1972 1972 for (lst = pattern; is_list(lst); lst = CDR(list_val(lst))) (gdb) bt #0 0x080e2c70 in analyze_pattern (tb=0x557e0c6c, pattern=1445085745, mpi=0x56224180) at beam/erl_db_hash.c:1972 #1 0x080e3b1a in db_select_chunk_hash (p=0x55894cdc, tbl=0x557e0c6c, pattern=1445085745, chunk_size=0, reverse=0, ret=0x56224228) at beam/erl_db_hash.c:1065 #2 0x080e4275 in db_select_hash (p=0x55894cdc, tbl=0x557e0c6c, pattern=1445085745, reverse=0, ret=0x56224228) at beam/erl_db_hash.c:1026 #3 0x080d2eb6 in ets_select_2 (A__p=0x55894cdc, A_1=112715, A_2=1445085745) at beam/erl_db.c:1663 #4 0x081096fe in process_main () at beam/beam_emu.c:2040 #5 0x080b75bd in sched_thread_func (vesdp=0x5589eb20) at beam/erl_process.c:701 #6 0x081534c2 in thr_wrapper (vtwd=0xff8732f0) at common/ethread.c:474 #7 0x555e3f3a in start_thread () from /lib/libpthread.so.0 #8 0x556c931e in clone () from /lib/libc.so.6 If I rebuild erts/emulator/beam/erl_db.c using -O1 optimization then erlang becomes working again. So, I think that it's a gcc-4.3 bug. -- Sergei Golovan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

