gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Segmentaton fault


From: Eric Merritt
Subject: Re: [Gcl-devel] Segmentaton fault
Date: Fri, 23 Apr 2004 14:24:49 -0700 (PDT)

Camm,

 The core problem in this instance (besides the
problem you described below) is that these mutually
recursive functions are not optimized as tail calls. I
did a little research into tail calls in gcc and it
looks like they are supported (with a few issues of
course, although gcc 3.4 is supposed to make these
types of calls much better). Have you guys aready
looked into this? These optimizations are very much
gcc specific, but I get the feeling that you gcl is
already tightly coupled to gcc already. 

Just curious, thanks for all the effort with gcl.
Eric



--- Camm Maguire <address@hidden> wrote:
> Greetings!  What is happening here is that the C
> stack is overflowing,
> raising a sigsegv, triggering the
> segmentation_catcher handler which
> has rudimentary code reporting C stack overflow
> conditions, but being
> unable to call it as there is no more C stack space.
>  I just tried
> mprotecting the last page of C stack PROT_READ or
> some such --
> mprotect won't work on the stack.  If you know of a
> way to raise the
> sigsegv in advance of being absolutely out of C
> stack space, which
> would allow the error handler to run, I'd be happy
> to consider
> implementing it.
> 
> Take care,
> 
> Eric Merritt <address@hidden> writes:
> 
> > Camm,
> > 
> >  Here is the backtrace you requested.
> > 
> >
>
-----------------------------------------------------
> > #0  0x40189f0f in tcgetattr () from /lib/libc.so.6
> > #1  0x40185b96 in isatty () from /lib/libc.so.6
> > #2  0x080642ed in rl_putc_em (c=32, f=0x401dfda0)
> at
> > gcl_readline.d:230
> > #3  0x08052b5a in writec_stream (c=32,
> strm=0x8531558)
> > at file.d:933
> > #4  0x0807df1e in writec_PRINTstream (c=32) at
> > print.d:223
> > #5  0x0807f553 in write_object (x=0x844dd20,
> level=0)
> > at print.d:719
> > #6  0x0808310b in princ (obj=0x844dd20,
> > strm=0x8531510) at print.d:1891
> > #7  0x080832e3 in print (obj=0x8a5ec84,
> > strm=0x8514020) at print.d:1948
> > #8  0x0804ac57 in L1 () at test.c:14
> > #9  0x0804acbc in L2 () at test.c:301
> > #10 0x0804ac6b in L1 () at test.c:16
> > #11 0x0804acbc in L2 () at test.c:30
> > #12 0x0804ac6b in L1 () at test.c:16
> > #13 0x0804acbc in L2 () at test.c:30
> > #14 0x0804ac6b in L1 () at test.c:16
> > #15 0x0804acbc in L2 () at test.c:30
> > #16 0x0804ac6b in L1 () at test.c:16
> > #17 0x0804acbc in L2 () at test.c:30
> > -------------------------------------------------
> > 
> > This goes on for atleast another 65000+ lines with
> no change
> > 
> > 
> >     
> >             
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> > http://photos.yahoo.com/ph/print_splash
> > 
> > 
> > 
> 
> -- 
> Camm Maguire                                          address@hidden
>
==========================================================================
> "The earth is but one country, and mankind its
> citizens."  --  Baha'u'llah



        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash




reply via email to

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