diff options
author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2007-04-26 19:18:57 +0000 |
---|---|---|
committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2007-04-26 19:18:57 +0000 |
commit | ed95d86d82a3ea4cf95906e500873a1cb3f91e4e (patch) | |
tree | bcd02b51cf3622b00564e9b820d8d04e0558865a /compiler/codeGen | |
parent | cdfe9b087902b321b56dd58df7d996a966947585 (diff) | |
download | haskell-ed95d86d82a3ea4cf95906e500873a1cb3f91e4e.tar.gz |
Avoid segfault when ticky file argument is stderr
If you compiled a program with -ticky and ran it with:
./foo +RTS -rstderr -RTS
the result would be a segfault. This was because the RTS interprets stderr to
mean "use debugBelch to print out messages," and sets the ticky file pointer
to NULL as a result, but PrintTickyInfo (the function in Ticky.c that prints
out the ticky report) wasn't checking for NULL.
I changed PrintTickyInfo to check whether the ticky file pointer is NULL and
output to stderr if so.
Also removed an unused import from CodeOutput.lhs.
Diffstat (limited to 'compiler/codeGen')
0 files changed, 0 insertions, 0 deletions