darcs patch: alpha: switch handling of 'foreign impor... (and 2
slyich at gmail.com
Thu Jul 8 14:14:41 EDT 2010
3 patches for repository http://darcs.haskell.org/ghc:
Thu Jul 8 09:53:18 EEST 2010 Sergei Trofimovich <slyfox at community.haskell.org>
* alpha: switch handling of 'foreign import wrapper' (FIW) to libffi
I tried to build ghc-6.12.3 and found out FIW part of code
does not compile anymore. It uses absent functions under #ifdef.
Instead of fixing it I just switched to libffi. Result built successfully
and passed 'foreign import wrapper' test I wrote for trac ticket #3516.
I didn't try to build -HEAD yet, but this patch only removes code, so
it should not make -HEAD worse.
Thu Jul 8 21:09:43 EEST 2010 Sergei Trofimovich <slyfox at community.haskell.org>
* Fixing link failure of compiler on ia64 ('-Wl,' prefixed value passed directly to ld)
/usr/bin/ld -Wl,--relax -r -o dist-stage1/build/HSghc-6.10.4.o \
dist-stage1/build/BasicTypes.o dist-stage1/build/DataCon.o ...
/usr/bin/ld: unrecognized option '-Wl,--relax'
If we just drop '-Wl,' part it will not help as '-r' and '--relax' are incompatible.
Looks like '-Wl,--relax' was skipped by earlier binutils' ld as unknown option.
Removing ia64 specific path.
Thu Jul 8 21:11:08 EEST 2010 Sergei Trofimovich <slyfox at community.haskell.org>
* storage manager: preserve upper address bits on 64bit machines (thanks to zygoloid)
the issue: durin ia64 ghc bootstrap (both 6.10.4 and 6.12.3) I
got the failure on stage2 phase:
"inplace/bin/ghc-stage2" -H32m -O -H64m -O0 -w ...
ghc-stage2: internal error: evacuate: strange closure type 15
(GHC version 6.12.3 for ia64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
make: *** [libraries/dph/dph-base/dist-install/build/Data/Array/Parallel/Base/Hyperstrict.o] Aborted
I attached gdb and got backtrace:
Breakpoint 1 at 0x400000000469ec31: file rts/RtsMessages.c, line 39.
(gdb) run -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
Starting program: /var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/lib/ghc-stage2 -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
[Thread debugging using libthread_db enabled]
Breakpoint 1, barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
#0 barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
#1 0x400000000474a1e0 in evacuate (p=0x6000000000147958) at rts/sm/Evac.c:756
#2 0x40000000046d68c0 in scavenge_srt (srt=0x6000000000147958, srt_bitmap=7) at rts/sm/Scav.c:348
> 16:52:53 < zygoloid> slyfox: i'm no ghc expert but it looks like HEAP_ALLOCED_GC(q)
> is returning true for a FUN_STATIC closure
> 17:18:43 < zygoloid> try: p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> (gdb) p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> $1 = 0
> 17:19:40 < zygoloid> i /think/ that means the mblock_cache is broken
> 17:22:45 < zygoloid> i can't help further. however i am suspicious that you seem to have pointers with similar-looking low 33
> bits and different high 4 bits, and it looks like such pointers get put into the same bucket in
> 17:36:16 < zygoloid> slyfox: try changing the definition of MbcCacheLine to StgWord64, see if that helps
> 17:36:31 < zygoloid> that's in includes/rts/storage/MBlock.h
And it helped!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 86759 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20100708/40a1703e/attachment-0001.bin
More information about the Cvs-ghc