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/Schedule.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/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index f25b37288d..957aa4b9cb 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1086,15 +1086,15 @@ schedulePostRunThread (Capability *cap, StgTSO *t) // If the current thread's allocation limit has run out, send it // the AllocationLimitExceeded exception. - if (t->alloc_limit < 0 && (t->flags & TSO_ALLOC_LIMIT)) { + if (PK_Int64((W_*)&(t->alloc_limit)) < 0 && (t->flags & TSO_ALLOC_LIMIT)) { // Use a throwToSelf rather than a throwToSingleThreaded, because // it correctly handles the case where the thread is currently // inside mask. Also the thread might be blocked (e.g. on an // MVar), and throwToSingleThreaded doesn't unblock it // correctly in that case. throwToSelf(cap, t, allocationLimitExceeded_closure); - t->alloc_limit = (StgInt64)RtsFlags.GcFlags.allocLimitGrace - * BLOCK_SIZE; + ASSIGN_Int64((W_*)&(t->alloc_limit), + (StgInt64)RtsFlags.GcFlags.allocLimitGrace * BLOCK_SIZE); } /* some statistics gathering in the parallel case */ |