Bug 21095 - [4.1 regression]: ./gcj-dbtool is in an infinite loop
Summary: [4.1 regression]: ./gcj-dbtool is in an infinite loop
Status: RESOLVED DUPLICATE of bug 21069
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 21069
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-18 21:05 UTC by H.J. Lu
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: ia64-unknown-linux-gnu
Target: ia64-unknown-linux-gnu
Build: ia64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2005-04-18 21:05:05 UTC
Something changed over the weekend which causes gcj-dbtool went into
an infinite loop

#1  0x2000000001f218c0 in nanosleep () from /lib/tls/libc.so.6.1
#2  0x2000000001f8e900 in usleep () from /lib/tls/libc.so.6.1
#3  0x2000000000c083d0 in spin (n=5330) at platform.h:102
#4  0x2000000000c08560 in wait_unlocked (he=0x2000000001d06800)
    at /net/gnu/export/gnu/src/gcc/gcc/libjava/java/lang/natObject.cc:627
#5  0x2000000000c092c0 in _Jv_MonitorEnter (obj=Variable "obj" is not available.)
    at /net/gnu/export/gnu/src/gcc/gcc/libjava/java/lang/natObject.cc:949
#6  0x2000000000c02920 in java::lang::Class::initializeClass (
    this=0x200000000182b1b8) at cni.h:99
#7  0x2000000000b8fe00 in _Jv_CreateJavaVM (vm_args=0x0) at Class.h:575
#8  0x2000000000b903e0 in _Jv_RunMain (vm_args=0x0, klass=0x600000000000ab30,
    name=0x0, argc=3, argv=0x60000fffffffa198, is_jar=false)
    at /net/gnu/export/gnu/src/gcc/gcc/libjava/prims.cc:1329
#9  0x2000000000b908b0 in _Jv_RunMain (klass=0x600000000000ab30, name=0x0,
    argc=3, argv=0x60000fffffffa198, is_jar=false)
    at /net/gnu/export/gnu/src/gcc/gcc/libjava/prims.cc:1375
#10 0x2000000000b90920 in JvRunMain (klass=0x600000000000ab30, argc=3,
    argv=0x60000fffffffa198)
    at /net/gnu/export/gnu/src/gcc/gcc/libjava/prims.cc:1381
#11 0x4000000000003680 in main (argc=3, argv=0x60000fffffffa198)
    at /tmp/ccq0iZBJ.i:11
Comment 1 H.J. Lu 2005-04-18 21:31:21 UTC
It looks like compare_and_swap gets miscompiled on ia64.
Working

[.LBB173:]
        .loc 7 24 0
        .mmi
        mov ar.ccv = r36
        nop 0
        or r14 = 1, r36
        .mmi
        mf
[.LBE173:]
[.LBE172:]
        .loc 1 945 0
        nop 0
        and r15 = 2, r36
[.LVL85:]
[.LBB174:]
[.LBB175:]
        .loc 7 24 0
        ;;
        .mmi
        nop 0
        cmpxchg8.acq r14 = [r33], r14, ar.ccv
[.LBE175:]
[.LBE174:]
        .loc 1 946 0
        nop 0
        ;;
        .mib
        nop 0
        cmp.eq p6, p7 = r36, r14
        (p6) br.cond.dpnt .L170
.L168:
        .loc 1 949 0
        .mib
        mov r42 = r33
[.LVL86:]
        nop 0
        br.call.sptk.many b0 = _Z13wait_unlockedP10hash_entry#
[.LVL87:]
        ;;

Not working:

[.LBB175:]
        .loc 5 24 0
        .mmi
        mov ar.ccv = r36
        nop 0
        or r14 = 1, r36
        .mmi
        mf
[.LBE175:]
[.LBE174:]
        .loc 1 945 0
        nop 0
        and r42 = 2, r36
[.LVL92:]
[.LBB176:]
[.LBB177:]
        .loc 5 24 0
        ;;
        .mmi
        nop 0
        cmpxchg8.acq r15 = [r33], r14, ar.ccv
[.LBE177:]
[.LBE176:]
        .loc 1 946 0
        nop 0
        ;;
        .mib
        nop 0
        cmp.eq p6, p7 = r14, r15
        (p6) br.cond.dpnt .L172
[.LVL93:]
.L170:
        .loc 1 949 0
        .mib
        mov r42 = r33
[.LVL94:]
        nop 0
        br.call.sptk.many b0 = _Z13wait_unlockedP10hash_entry#
[.LVL95:]
        ;;
Comment 2 Andrew Pinski 2005-04-18 22:06:35 UTC
Then this is a dup of bug 21069.
Comment 3 Richard Henderson 2005-04-20 06:55:52 UTC

*** This bug has been marked as a duplicate of 21069 ***