simonpj at microsoft.com
Tue Apr 24 10:34:27 EDT 2007
OK, I committed my small patch to ticky. Over to you!
| -----Original Message-----
| From: Tim Chevalier [mailto:catamorphism at gmail.com]
| Sent: 06 April 2007 05:04
| To: Simon Peyton-Jones
| Cc: cvs-ghc at haskell.org
| Subject: Re: ticky
| On 4/5/07, Tim Chevalier <catamorphism at gmail.com> wrote:
| > Also -- I just noticed that my segfault isn't the same as your
| > segfault, apparently, because I'm not using a 64-bit machine (or
| > rather, I am, but my OS thinks it's running on a 32-bit machine for
| > some reason I don't want to explore). I get a segfault if I run with
| > -rstderr, but everything works perfectly if I run with -rfoo.txt (or
| > any other output file name I try). I'll look into that, but I'm
| > surprised that you were able to eliminate the segfault just by
| > changing the word sizes...
| I figured out the segfault I was getting, in any case: in
| open_stats_file in RtsFlags.c, the stats file pointer gets set to NULL
| if you pass in "stderr" for the filename. But the code in
| PrintTickyInfo in Ticky.c doesn't check for NULL before writing to the
| stats file. A comment in RtsFlags.c says that stderr as an argument to
| -r means to use debugBelch to print out messages. But PrintTickyInfo
| prints out a lot of messages, so I'm not sure how to do that simply.
| The only thing I can think of is to check for a NULL file pointer in
| PrintTickyInfo and bail out if so. At least that avoids the segfault
| in this case. I don't entirely understand how this code is supposed to
| behave, so I'll wait for comment before making that change.
| I can't debug the segfault you were getting, though, since I don't
| have a 64-bit machine... maybe you could check in the code you have so
| far and I can (if necessary) go from there?
| Tim Chevalier * chevalier at alum.wellesley.edu * Often in error, never in doubt
| Confused? See http://catamorphism.org/transition.html
More information about the Cvs-ghc