bugGuile - Bugs: bug #34616, Segfault when building against...

 
 

bug #34616: Segfault when building against debug version of bdw-gc (patch offered)

Submitted by:  Bake Timmons <bt3>
Submitted on:  Sat 22 Oct 2011 03:48:58 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 22 Oct 2011 11:34:50 AM UTC, comment #1:

Thanks for the report! I committed a slightly different version in commit 80fc43f2cf12c7a21a0533cc84e91059ef9d8170.

Ludovic Courtès <civodul>
Project Administrator
Sat 22 Oct 2011 03:48:58 AM UTC, original submission:

After installing a debugging version of bdwgc, I tried installing
Guile from trunk. After running autogen.sh and configure, I added

#define GC_DEBUG 1

to config.h

Running make resulted in

/bin/bash: line 1: 8365 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
8366 Segmentation fault | GUILE_AUTO_COMPILE=0 ../meta/uninstalled-env guild snarf-check-and-output-texi > guile-procedures.texi
make[3]: *** [guile-procedures.texi] Error 1

The backtrace of running meta/gdb-uninstalled-guile :

(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb7f471d8 in scm_c_get_internal_run_time () at stime.c:269
#2 0xb7ee5111 in start_gc_timer (hook_data=<optimized out>, fn_data=<optimized out>,
data=<optimized out>) at gc.c:717
#3 start_gc_timer (hook_data=0x0, fn_data=0x0, data=0x0) at gc.c:712
#4 0xb7ef2c73 in scm_c_hook_run (hook=0xb7fdc5fc, data=0x0) at hooks.c:103
#5 0xb7ee4dc8 in run_before_gc_c_hook () at gc.c:204
#6 0xb7c8d63e in GC_notify_full_gc () at alloc.c:334
#7 0xb7c8d848 in GC_try_to_collect_inner (stop_func=0xb7c8d1ae <GC_never_stop_func>)
at alloc.c:429
#8 0xb7c8eb6e in GC_collect_or_expand (needed_blocks=1, ignore_off_page=0, retry=0)
at alloc.c:1215
#9 0xb7c8ee57 in GC_allocobj (gran=9, kind=1) at alloc.c:1302
#10 0xb7c94cca in GC_generic_malloc_inner (lb=72, k=1) at malloc.c:121
#11 0xb7c9031f in GC_debug_generic_malloc_inner (lb=12, k=1) at dbg_mlc.c:526
#12 0xb7c91d96 in GC_general_register_disappearing_link (link=0x813db50, obj=0x8146a00)
at finalize.c:175
#13 0xb7f6c6e8 in scm_weak_car_pair (car=0x8146a38, cdr=0x904) at weaks.c:66
#14 0xb7ef0a5d in scm_hash_fn_create_handle_x (table=0x80c2fd8, obj=0x8146a38,
init=0x904, hash_fn=0xb7f4fc40 <symbol_lookup_hash_fn>,
assoc_fn=0xb7f50390 <symbol_lookup_assoc_fn>, closure=0x0) at hashtab.c:720
#15 0xb7f4fd8f in intern_symbol (symbol=0x8146a38) at symbols.c:195
#16 scm_i_str2symbol (str=0xb7fbf1c0) at symbols.c:218
#17 0xb7f702fc in scm_init_posix () at ../libguile/posix.x:47
#18 0xb7ef64ff in scm_i_init_guile (base=0xbffff418) at init.c:454
#19 0xb7f51e88 in scm_i_init_thread_for_guile (base=0xbffff418, parent=<optimized out>)
at threads.c:795
#20 scm_i_init_thread_for_guile (base=0xbffff418, parent=0x0) at threads.c:774
#21 0xb7f51ed8 in with_guile_and_parent (base=0xbffff418, data=0xbffff444)
at threads.c:861
#22 0xb7c9b1f6 in GC_call_with_stack_base (fn=0xb7f51eb0 <with_guile_and_parent>,
arg=0xbffff444) at misc.c:1535
#23 0xb7f51863 in scm_i_with_guile_and_parent (func=<optimized out>,
data=<optimized out>, parent=0x0) at threads.c:911
#24 0xb7ef635f in scm_boot_guile (argc=1, argv=0xbffff554,
main_func=0x8048790 <inner_main>, closure=0x0) at init.c:319
#25 0x0804870b in main (argc=1, argv=0xbffff554) at guile.c:70

scm_c_get_internal_run_time tries to run get_internal_run_time before
get_internal_run_time has been initialized w/ a value (a pointer to a
function). There is no crash after moving the scm_init_stime call in
init.c to run before the scm_init_posix call. Further (standard,
non-debugging) builds of Guile trunk have also succeeded after moving
up the scm_init_stime call in init.c .

Bake Timmons <bt3>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24182:  guile-gc-debug-patch added by bt3 (652B - application/octet-stream - Patch and commit message attached)
file #24183:  guile-gc-debug-patch.log added by bt3 (295B - application/octet-stream - Patch and commit message attached)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by civodul (Posted a comment)
  • -unavailable- added by bt3 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Oct 2011 11:34:50 AM UTCcivodulOpen/ClosedOpen=>Closed
    Sat 22 Oct 2011 03:48:58 AM UTCbt3Attached File-=>Added guile-gc-debug-patch, #24182
      Attached File-=>Added guile-gc-debug-patch.log, #24183

    Back to the top


    Powered by Savane 3.1-cleanup1