Hi, Mark,
I found scm_from_stringn () is called with bad address.
Following is the back trace of core which I encountered during making guile-2.0.5 with gcc -m64. (gcc version is 3.4.3)
% pwd
/tmp/guile-2.0.5/libguile/.libs
% dbx guile ../core
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.9' in your .dbxrc
Reading guile
core file header read successfully
Reading ld.so.1
Reading libguile-2.0.so.22.4.0
Reading libgc.so.1.0.3
Reading libpthread.so.1
Reading libdl.so.1
Reading libffi.so.5.0.10
Reading libintl.so.8.1.1
Reading libc.so.1
Reading libunistring.so.0.1.2
Reading libiconv.so.2.5.1
Reading libgmp.so.10.0.4
dbx: internal warning: "(null)"::srcpath(): srcpath "abs.c" being overriden to "abs.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "add.c" being overriden to "add.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "add_ui.c" being overriden to "add_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "clear.c" being overriden to "clear.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "clears.c" being overriden to "clears.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp.c" being overriden to "cmp.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp_d.c" being overriden to "cmp_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp_si.c" being overriden to "cmp_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp_ui.c" being overriden to "cmp_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "dump.c" being overriden to "dump.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_sint.c" being overriden to "fits_sint.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_slong.c" being overriden to "fits_slong.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_sshort.c" being overriden to "fits_sshort.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_uint.c" being overriden to "fits_uint.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_ulong.c" being overriden to "fits_ulong.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fits_ushort.c" being overriden to "fits_ushort.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_d.c" being overriden to "get_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_d_2exp.c" being overriden to "get_d_2exp.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_si.c" being overriden to "get_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_str.c" being overriden to "get_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_ui.c" being overriden to "get_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "init.c" being overriden to "init.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "init2.c" being overriden to "init2.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "inits.c" being overriden to "inits.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "inp_str.c" being overriden to "inp_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "iset.c" being overriden to "iset.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "iset_d.c" being overriden to "iset_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "iset_si.c" being overriden to "iset_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "iset_str.c" being overriden to "iset_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "iset_ui.c" being overriden to "iset_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "mul.c" being overriden to "mul.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "mul_2exp.c" being overriden to "mul_2exp.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "mul_ui.c" being overriden to "mul_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "neg.c" being overriden to "neg.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "nextprime.c" being overriden to "nextprime.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "out_str.c" being overriden to "out_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "pow_ui.c" being overriden to "pow_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "random2.c" being overriden to "random2.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set.c" being overriden to "set.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_d.c" being overriden to "set_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_q.c" being overriden to "set_q.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_si.c" being overriden to "set_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_str.c" being overriden to "set_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_ui.c" being overriden to "set_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "size.c" being overriden to "size.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "sqrt.c" being overriden to "sqrt.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "sub.c" being overriden to "sub.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "sub_ui.c" being overriden to "sub_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "swap.c" being overriden to "swap.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "ui_sub.c" being overriden to "ui_sub.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "urandomb.c" being overriden to "urandomb.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "abs.c" being overriden to "abs.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "clear.c" being overriden to "clear.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "clears.c" being overriden to "clears.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp.c" being overriden to "cmp.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp_si.c" being overriden to "cmp_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp_ui.c" being overriden to "cmp_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "div.c" being overriden to "div.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_d.c" being overriden to "get_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_str.c" being overriden to "get_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "init.c" being overriden to "init.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "inits.c" being overriden to "inits.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "inp_str.c" being overriden to "inp_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "mul.c" being overriden to "mul.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "neg.c" being overriden to "neg.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "out_str.c" being overriden to "out_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set.c" being overriden to "set.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_si.c" being overriden to "set_si.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_str.c" being overriden to "set_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_ui.c" being overriden to "set_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_z.c" being overriden to "set_z.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_d.c" being overriden to "set_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_f.c" being overriden to "set_f.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "swap.c" being overriden to "swap.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "add.c" being overriden to "add.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "sub.c" being overriden to "sub.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "neg.c" being overriden to "neg.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "divis.c" being overriden to "divis.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "fib2_ui.c" being overriden to "fib2_ui.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "dump.c" being overriden to "dump.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "mul.c" being overriden to "mul.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "random.c" being overriden to "random.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "random2.c" being overriden to "random2.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "rootrem.c" being overriden to "rootrem.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "sqrtrem.c" being overriden to "sqrtrem.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_str.c" being overriden to "get_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "set_str.c" being overriden to "set_str.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "scan0.c" being overriden to "scan0.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "scan1.c" being overriden to "scan1.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "cmp.c" being overriden to "cmp.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "perfsqr.c" being overriden to "perfsqr.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "perfpow.c" being overriden to "perfpow.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "gcd.c" being overriden to "gcd.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "gcdext.c" being overriden to "gcdext.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "tdiv_qr.c" being overriden to "tdiv_qr.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "get_d.c" being overriden to "get_d.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "invert.c" being overriden to "invert.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "divexact.c" being overriden to "divexact.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "powm.c" being overriden to "powm.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "powm_sec.c" being overriden to "powm_sec.c"
dbx: internal warning: "(null)"::srcpath(): srcpath "remove.c" being overriden to "remove.c"
Reading libltdl.so.7.3.0
Reading librt.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.2
Reading libgcc_s.so.1
Reading libaio.so.1
Reading libmd.so.1
***@1 (***@1) program terminated by signal SEGV (no mapping at the fault address)
Current function is c_strcasecmp
39 c1 = c_tolower (*p1);
(dbx) print p1
p1 = 0xfffffffffff56ee0 "<bad address 0xfffffffffff56ee0>"
(dbx) where
current thread: ***@1
=>[1] c_strcasecmp(s1 = 0xfffffffffff56ee0 "<bad address 0xfffffffffff56ee0>", s2 = 0x7fffffb4eb90 "UTF-8"), line 39 in "c-strcasecmp.c"
[2] u8_conv_from_encoding(fromcode = 0xfffffffffff56ee0 "<bad address 0xfffffffffff56ee0>", handler = iconveh_escape_sequence, src = 0xfffffd7fffdfea1a "snarf-check-and-output-texi", srclen = 27U, offsets = (nil), resultbuf = (nil), lengthp = 0xfffffd7fffdfdf08) (optimized), at 0x7fffffa1c9f0 (line ~39) in "u8-conv-from-enc.c"
[3] u32_conv_from_encoding(fromcode = <value unavailable>, handler = <value unavailable>, src = <value unavailable>, srclen = 27U, offsets = (nil), resultbuf = (nil), lengthp = 0xfffffd7fffdfdf70) (optimized), at 0x7fffffa1c2a0 (line ~52) in "u-conv-from-enc.h"
[4] scm_from_stringn(str = 0xfffffd7fffdfea1a "snarf-check-and-output-texi", len = 27U, encoding = 0xfffffffffff56ee0 "<bad address 0xfffffffffff56ee0>", handler = SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE), line 1515 in "strings.c"
[5] locale_arguments_to_string_list(argc = 5, argv = 0xfffffd7fffdfe688), line 394 in "script.c"
[6] scm_i_set_boot_program_arguments(argc = 0, argv = (nil)), line 405 in "script.c"
[7] invoke_main_func(body_data = 0xfffffd7fffdfe630), line 335 in "init.c"
[8] c_body(d = 0xfffffd7fffdfe580), line 512 in "continuations.c"
[9] vm_regular_engine(vm = 0x4da270, program = 0x3560d40, argv = 0x7fffffec7260, nargs = 1), line 960 in "vm-i-system.c"
[10] scm_c_vm_run(vm = 0x4da270, program = 0x355a1e0, argv = 0xfffffd7fffdfe180, nargs = 0), line 567 in "vm.c"
[11] eval(x = 0x587570, env = 0x3542270), line 341 in "eval.c"
[12] eval(x = 0x5873b0, env = 0x3542270), line 297 in "eval.c"
[13] eval(x = 0x4ee920, env = 0x3542240), line 462 in "eval.c"
[14] boot_closure_apply(closure = (nil), args = (nil)), line 956 in "eval.c"
[15] vm_regular_engine(vm = 0x4da270, program = 0x355a060, argv = 0x7fffffe532b0, nargs = 1), line 960 in "vm-i-system.c"
[16] scm_c_vm_run(vm = 0x4da270, program = 0x4ff1c0, argv = 0xfffffd7fffdfe4d0, nargs = 4), line 567 in "vm.c"
[17] scm_call_4(proc = 0x4ff1c0, arg1 = (nil), arg2 = (nil), arg3 = (nil), arg4 = (nil)), line 507 in "eval.c"
[18] scm_i_with_continuation_barrier(body = 0x7fffffe49ec0 = &`libguile-2.0.so.22.4.0`continuations.c`c_body(register void *d), body_data = 0xfffffd7fffdfe580, handler = 0x7fffffe49ef0 = &`libguile-2.0.so.22.4.0`continuations.c`c_handler(register void *d, register SCM tag, register SCM args), handler_data = 0xfffffd7fffdfe580, pre_unwind_handler = 0x7fffffe49f50 = &`libguile-2.0.so.22.4.0`continuations.c`pre_unwind_handler(register void *error_port, register SCM tag, register SCM args), pre_unwind_handler_data = 0x4da1a0), line 450 in "continuations.c"
[19] scm_c_with_continuation_barrier(func = (nil), data = (nil)), line 546 in "continuations.c"
[20] with_guile_and_parent(base = 0xfffffd7fffdfe5e0, data = (nil)), line 902 in "threads.c"
[21] GC_call_with_stack_base(fn = (nil), arg = (nil)), line 1530 in "misc.c"
[22] scm_i_with_guile_and_parent(func = (nil), data = (nil), parent = (nil)), line 945 in "threads.c"
[23] scm_boot_guile(argc = 0, argv = (nil), main_func = (nil), closure = (nil)), line 319 in "init.c"
[24] main(argc = 0, argv = (nil)), line 71 in "guile.c"
Regards,
Post by Kiyoshi KANAZAWAHi, Mark,
Thank you for your kindness.
I'm discussing with a member of gc project these 5 days.
He also told me to configure with "--enable-threads=posix" instead of -DGC_THREADS.
And I'm also testing the latest gc-7.2 candidate and gc-7.3 (developement) candidate.
Now, I'm retrying to build guile-2.0.5 again.
Make & make check pass with gcc-3.4.3 -m32, but make fail with -m64.
Message of make check is:as follows.
(libguile-2.0.so.22 is "ELF 64-bit LSB executable", so that it can be linked.)
make all-am
make[3]: Entering directory `/tmp/guile-2.0.5/libguile'
GEN guile-procedures.texi
ld.so.1: guile: fatal: libguile-2.0.so.22: open failed: No such file or directory
/bin/bash: line 1: 23126 Broken Pipe cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc feature.doc filesys.doc fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc
stacks.doc stime.doc strings.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc trees.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc
23127 Killed | GUILE_AUTO_COMPILE=0 ../meta/uninstalled-env guild snarf-check-and-output-texi > guile-procedures.texi
make[3]: *** [guile-procedures.texi] Error 1
Regards,
Post by Mark H WeaverPost by Kiyoshi KANAZAWAThank you Mark,
(1) Now, make succeeds with threads
Version of libgc is 7.1, but I found some macro define is required for threads on Solaris.
After re-install gc-7.1 with -DGC_SOLARIS_THREADS or -DGC_THREADS,
make succeeds.
This is not my area of expertise, but for lack of other suggestions, I
1. You could try recompiling libgc using POSIX threads instead of
Solaris threads, and then rebuilding Guile from scratch, starting
with configure, and linking against the new libgc.
Guile supports only POSIX threads, and I wouldn't be surprised if
there are problems associated with linking Guile against a libgc that
uses a different threading library with slightly different semantics.
2. You could try a newer version of libgc: 7.2alpha6, from
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz
Despite the scary version number, Hans Boehm himself now recommends
this version because 7.1 is so old (see "Where to get the collector"
at http://www.hpl.hp.com/personal/Hans_Boehm/gc/ )
Thanks,
Mark
Post by Kiyoshi KANAZAWA(2) Segmentation Fault occur in make check
make check-TESTS
make[5]: Entering directory `/tmp/guile-2.0.5/test-suite/standalone'
Assertion failed: SCM_I_IS_THREAD (data.thread), file threads.c, line 1135
/bin/bash: line 5: 11634 Abort srcdir="." builddir="." CHARSETALIASDIR
="/tmp/guile-2.0.5/lib" GUILE_AUTO_COMPILE=0 "../../meta/uninstalled-env" ${dir}$tst
FAIL: test-system-cmds
PASS: test-extensions
/bin/bash: line 5: 12409 Segmentation Fault srcdir="." builddir="." CHARSETALIASDIR
="/tmp/guile-2.0.5/lib" GUILE_AUTO_COMPILE=0 "../../meta/uninstalled-env" ${dir}$tst
FAIL: test-with-guile-module
PASS: test-scm-with-guile
/bin/bash: line 5: 12455 Segmentation Fault srcdir="." builddir="." CHARSETALIASDIR
="/tmp/guile-2.0.5/lib" GUILE_AUTO_COMPILE=0 "../../meta/uninstalled-env" ${dir}$tst
FAIL: test-scm-spawn-thread
/bin/bash: line 5: 12479 Segmentation Fault srcdir="." builddir="." CHARSETALIASDIR
="/tmp/guile-2.0.5/lib" GUILE_AUTO_COMPILE=0 "../../meta/uninstalled-env" ${dir}$tst
FAIL: test-pthread-create
SKIP: test-pthread-create-secondary
==================================
4 of 27 tests failed
(1 test was not run)
==================================