diff options
author | Karel Gardas <karel.gardas@centrum.cz> | 2015-02-14 22:46:47 +0100 |
---|---|---|
committer | Karel Gardas <karel.gardas@centrum.cz> | 2015-02-23 10:27:37 +0100 |
commit | b2be772a97f6e7fe9f1d1c28108949f81a13158b (patch) | |
tree | 86ab34834027222796365549d46a5e818eea4a4b /rts/Threads.c | |
parent | 1f60d635cee1ff3db72e0129f9035b147f52c9c4 (diff) | |
download | haskell-b2be772a97f6e7fe9f1d1c28108949f81a13158b.tar.gz |
fix bus errors on SPARC caused by unalignment access to alloc_limit (fixes #10043)
Reviewers: austin, simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D657
Diffstat (limited to 'rts/Threads.c')
-rw-r--r-- | rts/Threads.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 90efd9ce4e..99f2be7304 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -110,7 +110,7 @@ createThread(Capability *cap, W_ size) tso->stackobj = stack; tso->tot_stack_size = stack->stack_size; - tso->alloc_limit = 0; + ASSIGN_Int64((W_*)&(tso->alloc_limit), 0); tso->trec = NO_TREC; @@ -173,12 +173,12 @@ HsInt64 rts_getThreadAllocationCounter(StgPtr tso) { // NB. doesn't take into account allocation in the current nursery // block, so it might be off by up to 4k. - return ((StgTSO *)tso)->alloc_limit; + return PK_Int64((W_*)&(((StgTSO *)tso)->alloc_limit)); } void rts_setThreadAllocationCounter(StgPtr tso, HsInt64 i) { - ((StgTSO *)tso)->alloc_limit = i; + ASSIGN_Int64((W_*)&(((StgTSO *)tso)->alloc_limit), i); } void rts_enableThreadAllocationLimit(StgPtr tso) |