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] 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 */