[Gc] Fwd: bdwgc SIGSEGV when stack size is exeeded

Ivan Maidanski <ivmai-JGs/[email protected]>
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
 Forwarding to mailing list
-------- Forwarded message --------
From: [email protected]
To: <[email protected]>
Date: Tue, 08 Apr 2014, 01:07 +04:00
Subject: bdwgc SIGSEGV when stack size is exeeded
Hi Ivan,
I am looking at  https://github.com/ivmai/bdwgc and the documentation
explicitly states that
"GC_malloc may return 0 if it is unable to acquire sufficient space
from the operating system. This is the most probable consequence of
running out of space. Other possible consequences are that a function
call will fail due to lack of stack space, or that the collector will
fail in other ways because it cannot maintain its internal data
structures, or that a crucial system process will fail and take down the
machine."
I am wondering if there is by any chances a way for a soft(er) landing
if the stack space is exhausted? I believe the cause to be in the stack
size, since setting a ulimit -s changes the point in time when the
program crashes. The program is an interpreter and is given a recursive
definition - so it is expected that something bad happens; I am just
trying to figure out what my options are to not crash to hard or at
least print a diagnostic message or something.
I'd apprechiate  any comments you may have.
For you convenience here is a stack trace, if you want to test this
your self I can send instructions but to build the interpreter and the
command that get into this state.
Much thanks.
oops.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b8586e in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:336
336         BZERO((/* no volatile */ void *)dummy, sizeof(dummy));
(gdb) bt
#0  0x00007ffff7b8586e in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:336
#1  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#2  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#3  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338#4  0x00007ffff7b85886 in GC_clear_stack_inner
(arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#5  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#6  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#7  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
---Type <return> to continue, or q <return> to quit---
     at misc.c:338
#8  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=limit@entry=0x7fffff7feda0 <Address 0x7fffff7feda0 out of
bounds>)
     at misc.c:338
#9  0x00007ffff7b85886 in GC_clear_stack_inner (arg=arg@entry=0x0,
     limit=0x7fffff7feda0 <Address 0x7fffff7feda0 out of bounds>) at
misc.c:338
#10 0x00007ffff7b858ee in GC_clear_stack (arg=arg@entry=0x0) at
misc.c:384
#11 0x00007ffff7b821ca in GC_generic_malloc_many (lb=lb@entry=96,
k=k@entry=1,
     result=result@entry=0x7ffff7dab438 <first_thread+312>) at
mallocx.c:363
#12 0x00007ffff7b8a179 in GC_malloc (bytes=87) at
thread_local_alloc.c:175
#13 0x00007ffff7b7ce4a in GC_debug_malloc (lb=48,
     s=0x4412d0 "/home/ruebenko/gitTest/splendini/uexLib/utils.c", i=6)
     at dbg_mlc.c:516

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.