[project @ 2004-05-27 15:18:31 by simonmar]
authorsimonmar <unknown>
Thu, 27 May 2004 15:18:31 +0000 (15:18 +0000)
committersimonmar <unknown>
Thu, 27 May 2004 15:18:31 +0000 (15:18 +0000)
commit86e487a2311303a82ac2936555ee08a285335caa
tree2b92bc1a44c7449699cc163b1652d02dc3f615ba
parentd2a0936520673ad341b1b4756c37ee429fc111ca
[project @ 2004-05-27 15:18:31 by simonmar]
Fix a nasty bug: when saving errno in the TSO after running a thread,
beware that the TSO might have moved, e.g. if the thread made a safe
foreign call in the threaded RTS and a GC happened.

We have to grab the new location of the TSO *before* saving errno.

MERGE TO STABLE

This was the most interesting bug hunt I've had in a while.  The crash
only showed up in about 1 in 4 runs of a program with 1000 Haskell
threads, running on the threaded RTS.  To make things worse, gdb
doesn't support watchpoints in programs with multiple threads... :-/
ghc/rts/Schedule.c