mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
(scm_must_realloc): bugfix: do mtrigger before
realloc. Thanks to Sam Hocevar for reporting this bug
This commit is contained in:
parent
c6d31743c5
commit
5a6432a012
4 changed files with 18 additions and 1 deletions
6
NEWS
6
NEWS
|
@ -16,6 +16,12 @@ Changes since Guile 1.6.4 (i.e. changes for 1.6.5):
|
|||
|
||||
* Changes to the distribution
|
||||
* Changes to the stand-alone interpreter
|
||||
|
||||
** GC bug fixed.
|
||||
|
||||
The use of scm_must_realloc() for memory which is scanned by GC, could
|
||||
trigger a GC scan of a free()d block of memory. This is now fixed.
|
||||
|
||||
* Changes to Scheme functions and syntax
|
||||
|
||||
** SRFI-1 delete equality argument order fixed.
|
||||
|
|
1
THANKS
1
THANKS
|
@ -46,6 +46,7 @@ For fixes or providing information which led to a fix:
|
|||
Eric Hanchrow
|
||||
Utz-Uwe Haus
|
||||
Karl M. Hegbloom
|
||||
Sam Hocevar
|
||||
Anders Holst
|
||||
Stefan Jahn
|
||||
Steven G. Johnson
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-07-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
||||
|
||||
* gc.c (scm_must_realloc): bugfix: do mtrigger before
|
||||
realloc. Thanks to Sam Hocevar for reporting this bug
|
||||
|
||||
2003-06-10 Marius Vollmer <mvo@zagadka.de>
|
||||
|
||||
* gc_os_dep.c (scm_get_stack_base): New version using
|
||||
|
|
|
@ -2051,10 +2051,15 @@ scm_must_realloc (void *where,
|
|||
scm_must_free() won't take NULL.
|
||||
*/
|
||||
scm_mallocated += size - old_size;
|
||||
SCM_SYSCALL (ptr = realloc (where, size));
|
||||
|
||||
/*
|
||||
The realloc must be after check_mtrigger(), since realloc might
|
||||
munge the old block of memory, which will be scanned by GC.
|
||||
*/
|
||||
check_mtrigger (what);
|
||||
|
||||
SCM_SYSCALL (ptr = realloc (where, size));
|
||||
|
||||
if (NULL != ptr)
|
||||
{
|
||||
#ifdef GUILE_DEBUG_MALLOC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue