Ticket #8552: PATCH_8552

File PATCH_8552, 1.2 KB (added by Tarrasch, 17 months ago)

In the meanwhile, we can apply this patch

Line 
1From e58da374c8cfd1722ea282355febb67b5fe7e7c5 Mon Sep 17 00:00:00 2001
2From: Arash Rouhani <[email protected]>
3Date: Thu, 21 Nov 2013 14:17:45 +0100
4Subject: [PATCH] Comment on StgArrWords vs StgArrBytes
5
6See #8552
7
8Signed-off-by: Arash Rouhani <[email protected]>
9---
10 includes/rts/storage/Closures.h | 9 ++++++++-
11 1 file changed, 8 insertions(+), 1 deletion(-)
12
13diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
14index 09e7021..2704128 100644
15--- a/includes/rts/storage/Closures.h
16+++ b/includes/rts/storage/Closures.h
17@@ -135,11 +135,18 @@ typedef struct StgBlockingQueue_ {
18     struct MessageBlackHole_ *queue;
19 } StgBlockingQueue;
20 
21+/* This struct should be called StgArrBytes rather than StgArrWords.
22+ *
23+ * One might be very tempted to store the number of words in the bytes field,
24+ * but the garbage collector will erase your data then.
25+ *
26+ * It's name is for historical reasons, see #3800
27+ */
28 typedef struct {
29     StgHeader  header;
30     StgWord    bytes;
31     StgWord    payload[FLEXIBLE_ARRAY];
32-} StgArrWords;
33+} StgArrWords; // TODO: s/StgArrWords/StgArrBytes (#8552)
34 
35 typedef struct {
36     StgHeader   header;
37--
381.8.1.2
39