3m: fix zeroing out of weak-box secondary pointer when the secondary pointer has moved in the mark phase
svn: r6704
This commit is contained in:
parent
94c820de78
commit
06b4cf70c9
|
@ -532,6 +532,7 @@ static int size_on_free_list(void *p)
|
|||
/******************************************************************************/
|
||||
|
||||
static int is_marked(void *p);
|
||||
#define weak_box_resolve(p) (p)
|
||||
|
||||
#include "weak.c"
|
||||
|
||||
|
|
|
@ -1170,6 +1170,8 @@ static unsigned short ephemeron_tag;
|
|||
#define is_marked(p) marked(p)
|
||||
typedef short Type_Tag;
|
||||
|
||||
#define weak_box_resolve(p) GC_resolve(p)
|
||||
|
||||
#include "weak.c"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -223,7 +223,9 @@ static void zero_weak_boxes()
|
|||
if (!is_marked(wb->val)) {
|
||||
wb->val = NULL;
|
||||
if (wb->secondary_erase) {
|
||||
*(wb->secondary_erase + wb->soffset) = NULL;
|
||||
void **p;
|
||||
p = (void **)GC_resolve(wb->secondary_erase);
|
||||
*(p + wb->soffset) = NULL;
|
||||
wb->secondary_erase = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user