From d9d0e94d95710705e1fe9452704fc55286849d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ggstr=C3=B6m?= Date: Wed, 5 Dec 2018 23:31:38 +0100 Subject: [PATCH 1/3] Initialize more fields of seginfo original commit: 48e93161f6ac2796d17a0f147f0dca1e1e195684 --- LOG | 1 + c/segment.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/LOG b/LOG index 7bec4b119f..6af9311a2b 100644 --- a/LOG +++ b/LOG @@ -1025,3 +1025,4 @@ where the cp register copy in the thread context could be changed in the callable prep before S_call_help gets it cpnanopass.ss, x86_64.ss, x86.ss, foreign2.c, foreign.ms +- initialize all fields of seginfo to avoid undefined values diff --git a/c/segment.c b/c/segment.c index b578889658..28ac765165 100644 --- a/c/segment.c +++ b/c/segment.c @@ -228,7 +228,9 @@ static void initialize_seginfo(seginfo *si, ISPC s, IGEN g) { si->space = s; si->generation = g; + si->sorted = 0; si->min_dirty_byte = 0xff; + si->trigger_ephemerons = NULL; for (d = 0; d < cards_per_segment; d += sizeof(ptr)) { iptr *dp = (iptr *)(si->dirty_bytes + d); /* fill sizeof(iptr) bytes at a time with 0xff */ From abf4ae18bb87bcb633d352c7fc993569fad13953 Mon Sep 17 00:00:00 2001 From: "R. Kent Dybvig" Date: Wed, 5 Dec 2018 15:25:21 -0800 Subject: [PATCH 2/3] Update LOG original commit: 62b92d664e166133d96cb084791ad51e57207bb1 --- LOG | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LOG b/LOG index 6af9311a2b..e5aae978a0 100644 --- a/LOG +++ b/LOG @@ -1025,4 +1025,5 @@ where the cp register copy in the thread context could be changed in the callable prep before S_call_help gets it cpnanopass.ss, x86_64.ss, x86.ss, foreign2.c, foreign.ms -- initialize all fields of seginfo to avoid undefined values +- added initialization of seginfo sorted and trigger_ephemerons fields. + segment.c From b7cca1a835280fbe58b3cf14e96c5a383bb3174a Mon Sep 17 00:00:00 2001 From: "R. Kent Dybvig" Date: Wed, 5 Dec 2018 15:30:40 -0800 Subject: [PATCH 3/3] Minor tweak original commit: d2b5ba5d5c45660e63b32fb501b6684d3d11036b --- c/segment.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/c/segment.c b/c/segment.c index 28ac765165..83e3dc7707 100644 --- a/c/segment.c +++ b/c/segment.c @@ -263,7 +263,6 @@ iptr S_find_segments(s, g, n) ISPC s; IGEN g; iptr n; { chunk->nused_segs += 1; initialize_seginfo(si, s, g); - si->sorted = 0; si->next = S_G.occupied_segments[s][g]; S_G.occupied_segments[s][g] = si; S_G.number_of_empty_segments -= 1; @@ -302,7 +301,6 @@ iptr S_find_segments(s, g, n) ISPC s; IGEN g; iptr n; { S_G.occupied_segments[s][g] = si; for (j = n, nextsi = si; j > 0; j -= 1, nextsi = nextsi->next) { initialize_seginfo(nextsi, s, g); - nextsi->sorted = 0; } S_G.number_of_empty_segments -= n; return si->number;