How does it work ?

Maxim Kizub max at immsp.kiev.ua
Mon Jan 4 01:16:00 PST 1999


Maxim Kizub wrote:
> 
> Hello.
> 
> With the latest kaffe from CVS under RedHat 5.1 kaffe
> assertion fails when I try to run kiev compiler (right after
> start).
> All kaffe test are passed.
> 
> Regards
>   Maxim Kizub

Hello.

With latest snapshot kaffe does not fails assertion, but
throws NullPointerException...

I've compiled with -DDEBUG and switched on GCDIAG - results
for mmap:
Adding method kiev/vlang/PassInfo:<init>()V (2)
gc_heap_malloc: freelist 13 at 0x8053bf0
Kaffe: mem/gc-mem.c:289: gc_heap_malloc: Assertion `(((gc_block *)
gc_block_base) + ((((uintp) mem->next) - gc_heap_base) >> gc_pgbits)) ==
blk' failed.
Aborted (core dumped)

hash:
Adding method kiev/vlang/PassInfo:<init>()V (2)
gc_heap_malloc: freelist 13 at 0x843c000
Kaffe: mem/gc-mem.c:289: gc_heap_malloc: Assertion
`((gc_block*)(((uintp)(mem->next)) & -gc_pgsize)) == blk' failed.
Aborted (core dumped)

Running without GCDIAG under KAFFE_DEBUG=gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x40026cc3 in gc_heap_malloc (sz=10) at mem/gc-mem.c:293
293                     GC_SET_STATE(blk, GCMEM2IDX(blk, mem),
GC_STATE_NORMAL);

gdb> where

#0  0x40026cc3 in gc_heap_malloc (sz=10) at mem/gc-mem.c:293
#1  0x40024bcd in gcMalloc (size=2, fidx=1) at mem/gc-incremental.c:876
#2  0x4001b634 in addCheckedExceptions (m=0x8491b40, len=4,
fp=0xbfffeb4c)
    at code.c:121
#3  0x40020a66 in readAttributes (fp=0xbfffeb4c, this=0x8471e08,
    thing=0x8491b40) at readClass.c:140
#4  0x40020c29 in readMethods (fp=0xbfffeb4c, this=0x8471e08)
    at readClass.c:174
#5  0x400205c9 in readClass (classThis=0x8471e08, fp=0xbfffeb4c,
loader=0x0,
    einfo=0xbffff254) at readClass.c:67
#6  0x40020d6f in findClass (centry=0x8490750, einfo=0xbffff254)
    at findInJar.c:118
#7  0x4001e3a5 in loadClass (name=0x8321550, loader=0x0,
einfo=0xbffff254)
    at classMethod.c:795
#8  0x4001bae0 in getClass (idx=374, this=0x83440e8, einfo=0xbffff254)
    at lookup.c:161
#9  0x4001b82d in getMethodSignatureClass (idx=273, this=0x83440e8,
    loadClass=true, isSpecial=false, call=0xbfffef20, einfo=0xbffff254)
    at lookup.c:77
#10 0x40038e75 in verifyBasicBlock (codeInfo=0x8459030, meth=0x83454e0,
    pc=2896, einfo=0xbffff254) at code-analyse.c:1715
#11 0x40032715 in verifyMethod (meth=0x83454e0, pcodeinfo=0xbffff1d4,
    einfo=0xbffff254) at code-analyse.c:314
#12 0x4005d379 in translate (meth=0x83454e0, einfo=0xbffff254)
    at ./jit/machine.c:220
#13 0x4002b6c6 in soft_fixup_trampoline (_pmeth=0x8367235) at soft.c:480
#14 0x400563b9 in i386_dft1 () at jit.def:1444
#15 0x4002a94d in callMethodV (meth=0x8317130, func=0x8295e3c, obj=0x0,
    args=0xbffff780, ret=0xbffff694) at support.c:539
#16 0x40044392 in Kaffe_CallStaticVoidMethodV (env=0x4006e658,
cls=0x8295d98,
    meth=0x8317130, args=0xbffff77c) at jni.c:2281
#17 0x40044437 in Kaffe_CallStaticVoidMethod (env=0x4006e658,
cls=0x8295d98,
    meth=0x8317130) at jni.c:2294
#18 0x80489de in main2 (env=0x4006e658, argv=0xbffffbdc, farg=8, argc=1)
    at main.c:184
#19 0x804882e in main (argc=2, argv=0xbffffbdc) at main.c:104

Setting "kaffe -ms 32M -mx32M" do not help.
I saw some changes in mem/ files in Changelog - these changes may
be the reason...
Also, this is without doing any actual work. Kaffe loads a lot of
classes
even when I do "kaffe kiev.Main -h" - i.e. ask only type help info...
It loads parsers,resolvers classes and so on. Why it does this?

Regards
  Maxim Kizub


More information about the kaffe mailing list