Code breaks with '-O', any ideas.

David Brown haskell2 at davidb.org
Mon Mar 5 15:42:00 EST 2007


Ian Lynagh wrote:
> On Mon, Mar 05, 2007 at 10:51:46AM -0800, David Brown wrote:
>> My program 'harchive' <http://www.davidb.org/darcs/harchive/> breaks
>> if compiled with '-O'.  Just wondering if anyone has suggestions on
>> how to figure out what might be causing this.
>
> What do you mean by "breaks"?

:-).  It guess it would be best to describe it as behaving
differently.  I've seen to case.  One has to do with my binding to
sqlite3.  Sometimes the queries don't return the right results or
gibberish is entered into the database.  This suggests my binding has
problems (like pointers living past a GC).

In another instance, a populated map was failing to find an entry in
it.  I added a debug message to print out the map, and then it worked
fine.

I'm now rebuilding individual parts with -O to see if I can isolate
the problem(s).

Thanks,
David



More information about the Glasgow-haskell-users mailing list