HEAD ghci crash on ppc OS X

Peter Tanski p.tanski at gmail.com
Sat Jan 20 00:47:01 EST 2007

On 16 Jan 2007, David Kirkman wrote:
> On 1/15/07, David Kirkman <dkirkman at gmail.com> wrote:
>> The comment above seems to be begging for a
>>     oc->image += oc->misalignment;
>> statement right after the call to stgMallocBytes.
> This did in fact work (patch for rts/Linker.c below).  And it *was* in
> the 6.6 sources, so it was removed in the last few months.  Putting
> the line back in seems to fix everything on ppc darwin: my code which
> uses "ghc as a library" to do a bunch of dynamic compilation and
> loading works again, and the test suite looks pretty much like the
> results from the latest linux builds
> (http://www.haskell.org/ghc/dist/current/logs/x86_64-unknown-linux- 
> test-summary)

Awesome! (I bet you haven't heard that exclamation since the '80s.)

> I can only get a partial darcs repository, so I can't figure out why
> the line was removed -- presumably to fix something that my patch will
> proceed to rebreak :)

I doubt you would re-break anything: the change was created by a  
patch fixing Bug #885.  If you look at the .dpatch in the listing for  
#885, the patch records at lines 329-335:

hunk ./rts/Linker.c 1379
-   oc->image += misalignment;
+#  else
+   oc->image = stgMallocBytes(oc->fileSize, "loadObj(image)");
+#  endif

but did not add your change back in.

Peter Tanski

More information about the Glasgow-haskell-users mailing list