Add freeScheduler/freeTaskManager and call it later than exitScheduler
authorIan Lynagh <igloo@earth.li>
Mon, 11 Dec 2006 13:10:04 +0000 (13:10 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 11 Dec 2006 13:10:04 +0000 (13:10 +0000)
commitcf6b495d8f6d8f08fd6603c5ba2ec7a6acf7ac01
treec580b3eac83af32a8f807914901181ed4a7dcf19
parentd526504719676871376324858fe2073aa2011424
Add freeScheduler/freeTaskManager and call it later than exitScheduler
We were freeing the tasks in exitScheduler (stopTaskManager) before
exitStorage (stat_exit), but the latter needs to walk down the list
printing stats. Resulted in segfaults with commands like
    ghc -v0 -e main q.hs -H32m -H32m +RTS -Sstderr
(where q.hs is trivial), but very sensitive to exact commandline and
libc version or something.
rts/RtsStartup.c
rts/Schedule.c
rts/Schedule.h
rts/Task.c
rts/Task.h