
On Thursday 17 June 2004 17:38, Simon Marlow wrote:
It looks like registerised compilation on x86_64 isn't quite working yet, then. If you're up to debugging this, then I suggest you start from a simpler program - try hello world registerised, and then slightly larger programs if that works.> Compile programs with -debug, and run with gdb to find out where the crash is happening. I would if I could, but unfortunately I can't even start ghc (the strace log I've attached before was created when running ghc without _any_ arguments): # ./ghc # Segmentation fault
By the way, the unregistered ghc does not build all programs I've tried. This was the result of trying a more complex one: # ghc-inplace --make Main.hs # Chasing modules from: Main.hs # ghc-6.2.20040613: internal error: getMBlock: mmap: Invalid argument Some other ones can be compiled but cannot be executed (like ghc). All crashes are related to memory management: #../log:mmap(0x2a96300000, 1048576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a96300000 #../log:mmap(0x2a96400000, 1048576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a96400000 #../log:mmap(0x2a96500000, 30739081986048, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument) #../log:write(2, "getMBlock: mmap: Invalid argumen"..., 33) = 33 Here's another trace of a different program - note that the first argument of mmap is the same when the crash occurs: #log:mmap(0x2a96300000, 1048576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2a96300000 #log:mmap(0x2a96400000, 1048576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2a96400000 #log:mmap(0x2a96500000, 11978664837120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument) #log:write(2, "getMBlock: mmap: Invalid argumen"..., 33) = 33 And a third one: #mprotect(0, 1048264, PROT_NONE) = -1 ENOMEM (Cannot allocate memory) #... #munmap(0x2a95c4f000, 131072) = 0 #--- SIGSEGV (Segmentation fault) @ 0 (0) -- I think we are at a dead end right now but at least I've become quite familiar with building ghc :-) Cheers Peter