Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6603980
Votes 0
Synopsis Sun C++ 5.9/x86 assertion in ube/machine/src/abi_call.c 227
Category compiler:ube
Reported Against
Release Fixed ceres(build_08)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6579425
Submit Date 12-SEP-2007
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
SunOS 5.10 i386


A DESCRIPTION OF THE PROBLEM :
The ube optimizer fails with an assertion on the attached test case.

REGRESSION.  Last worked in version studio11

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the attached test case as follows:

CC -O -V -m64 t.cpp


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No error.
ACTUAL -

ir2hf: Sun Compiler Common 12 SunOS_i386 2007/05/03
ube: Sun Compiler Common 12 SunOS_i386 2007/05/03
"t.cpp", [__1cBBDfoo6Mn0ABD__v_]:ube: error: Assert has been violated at '/set/mars/builds. customer -S2/nightly.Thu/ customer -S2/lang/ube/machine/src/abi_call.c 172'.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
"t.cpp", [__1cBBDfoo6Mn0ABD__v_]:ube: error: Assert has been violated at '/set/mars/builds. customer -S2/nightly.Thu/ customer -S2/lang/ube/machine/src/abi_call.c 172'.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
struct A { };

struct B {
    struct C {
        int *x_;
        int y_;
        C (int *x = 0, int y = 0): x_ (x), y_ (y) { }
    };
    struct D: C, A { D (int *x = 0, int y = 0): C (x, y) { } };
    void foo (D);
};

void B::foo (D) { }

int main () {
    B vb;
    vb.foo (B::D ());
} 

---------- END SOURCE ----------
Posted Date : 2007-09-12 21:29:41.0
Work Around
N/A
Evaluation
Assert in routine "machine_classify_argument" appears when the struct with following property is used as call-parameter:
- size of struct is 2 eightbytes (size of struct in testcase 8+4 bytes = 2 eightbutes)
- struct has empty (size = 0) substruct
- struct in not transformed before to plain struct (without inner structs)

Assert indicates that initially detected as 2-eightbytes struct become more than 2-eightbytes. Odd eightbyte belongs to empty struct. Cause of this mistaken size detection of zero-sized object is that there is special agreement in routine "machine_classify_argument" for return the size of empty object: size=1, calss=ABI64_NO_CLASS and in place when assert appears there is no any processing of this special case, see suggested fix (n - calculated size of current structure member (in eightbytes), pos - position in structure of currently processed object (in eightbytes), MAX_CLASSES=2)
Posted Date : 2007-10-12 11:24:21.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang