diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-04-20 12:21:25 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-04-20 12:21:25 +0000 |
commit | 870b59f53cb97904096bfd6ea0e58ffc055a14ea (patch) | |
tree | 08d13d098df4f1b7e49579aa4acbc9d83802f04c /rts/win32 | |
parent | 5a252eb7bbbe655f63f65e012b8176fd1dd6953f (diff) | |
download | haskell-870b59f53cb97904096bfd6ea0e58ffc055a14ea.tar.gz |
Fix crash in non-threaded RTS on Windows
The tso->block_info field is now overwritten by pushOnRunQueue(), but
stg_block_async_info was assuming that it still held a pointer to the
StgAsyncIOResult. We must therefore save this value somewhere safe
before putting the TSO on the run queue.
Diffstat (limited to 'rts/win32')
-rw-r--r-- | rts/win32/AsyncIO.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/win32/AsyncIO.c b/rts/win32/AsyncIO.c index 8662e2a369..5dedee0c70 100644 --- a/rts/win32/AsyncIO.c +++ b/rts/win32/AsyncIO.c @@ -313,6 +313,11 @@ start: /* Terminates the run queue + this inner for-loop. */ tso->_link = END_TSO_QUEUE; tso->why_blocked = NotBlocked; + // save the StgAsyncIOResult in the + // stg_block_async_info stack frame, because + // the block_info field will be overwritten by + // pushOnRunQueue(). + tso->sp[1] = (W_)tso->block_info.async_result; pushOnRunQueue(&MainCapability, tso); break; } |