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: 6567388
Votes 0
Synopsis Sun Studio 12 ube can segfault on GNU inline assembler code
Category compiler:ube
Reported Against
Release Fixed studio12(patch_01), ceres(build_03) (Bug ID:2153842)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 08-JUN-2007
Description
** misplaced entry deleted, see next one
Posted Date : 2007-06-08 05:47:12.0

The problem occurs on both Solaris x64 and Linux, when using any optimisation,
including -xO0, with -g. The following is derived from openmpi-1.2.2:

$ cat inlineasm.c
typedef int          int32_t;
typedef unsigned int uint32_t;

static int opal_atomic_cmpset_32( volatile int32_t *addr,
                                        int32_t oldval, int32_t newval)
{
   unsigned char ret;
   __asm__ __volatile__ (
                       "lock; " "cmpxchgl %1,%2   \n\t"
                               "sete     %0      \n\t"
                       : "=qm" (ret)
                       : "q"(newval), "m"(*((volatile long*)addr)), "a"(oldval)
                       : "memory");

   return (int)ret;
}
$ suncc -xO0 -m64 -g -c inlineasm.c
"inlineasm.c", line 13: warning: parameter in inline asm statement unused: %3
"inlineasm.c", [opal_atomic_cmpset_32]:ube: error: SIGNAL: Segmentation Fault



cat
Posted Date : 2007-06-08 04:15:51.0
Work Around
N/A
Evaluation
The failure was due to inadequate support for the "q" constraint in ube.
Posted Date : 2007-06-13 15:48:37.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang