[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix for Re: crash in gc with upside-down stack
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] fix for Re: crash in gc with upside-down stack |
Date: |
Fri, 14 Nov 2008 00:40:42 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Hi,
"Linas Vepstas" <address@hidden> writes:
> The patch below fixes a crash during garbage collection, where, during
> the mark-stack phase, the top and bottom of the stack are found to be
> in backwards order, typically because scm_with_guile() was called when
> the stack is much shorter than when a thread was first guilified. That
> is, the stack base pointer is stale, and can be inverted from the stack
> top. If GC runs due to activity in some other thread, the stale base
> pointer leads to the crash (as base-top is approximately 2^32 or 2^64).
Good catch! I applied it, along with a test case that reproduced the
problem:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=cd1a1e47b5e781277560d9933a44e6aabd0c9c49
Thanks!
Ludo'.