guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segmentation fault in CVS


From: Neil Jerram
Subject: Re: Segmentation fault in CVS
Date: Fri, 09 Dec 2005 14:09:59 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Bruce Korb <address@hidden> writes:

> Neil Jerram wrote:
>> I'm seeing a failure of the test-system-cmds test, and have narrowed
>> it down to this:
>> address@hidden:~/guile-cvs-head/guile/guile-core$ ./pre-inst-guile -q
>> guile> (exit 42)
>> Segmentation fault
>
> Marius was saying something about returning NULL in some path back
> to one of the entry functions.  If he really meant NULL and not 0,
> then he was talking about some sort of pointer that is taking on the
> value of 42?  Dunno....I do bet it is related.  :(  Cheers - Bruce

Perhaps, yes.  According to GDB the backtrace at the crash is

(gdb) bt
#0  0x401867f1 in pthread_mutex_lock () from /lib/tls/libpthread.so.0
#1  0x400b6a6b in scm_i_thread_put_to_sleep () at threads.c:1538
#2  0x4009a83f in scm_i_string_writable_chars (orig_str=0x5b) at strings.c:352
#3  0x4009b02d in scm_c_string_set_x (str=0x405c3d00, p=0, chr=0x34)
    at strings.c:669
#4  0x40090485 in scm_read_token (ic=52, tok_buf=0xbfffe468, port=0x403ddc58, 
    weird=0) at read.c:700
#5  0x4008fff1 in scm_lreadr (tok_buf=0xbfffe468, port=0x403ddc58, 
    copy=0xbfffe46c) at read.c:642

and the problem appears to be that all_threads->next_thread has become
invalid:

(gdb) p *all_threads
$9 = {next_thread = 0xffffffff, handle = 0x405217f8, pthread = 1089387440, 
  join_queue = 0x405217e0, result = 0x4, exited = 0, sleep_object = 0x4, 
  sleep_mutex = 0x0, sleep_cond = {__c_lock = {__status = 0, __spinlock = 0}, 
  ...}...}

I'm not sure that's the real problem though, could just be an artefact
of stack corruption.  I tried breaking at the point (guilify_self_1)
where all_threads->next_thread is initialized correctly, and then
setting a watchpoint on all_threads->next_thread, but the watchpoint
didn't fire and the segmentation fault still occurred.

Regards,
        Neil






reply via email to

[Prev in Thread] Current Thread [Next in Thread]