[Bug target/33286] New: All exception related tests fail

danglin at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Sep 2 19:01:00 GMT 2007


All exception related tests fail on this target.  For example,

Executing on host: /home/gnu/gcc/objdir/gcc/xgcc -B/home/gnu/gcc/objdir/gcc/
/xx
x/gnu/gcc/gcc/gcc/testsuite/gcc.dg/cleanup-5.c   -fexceptions -fno-show-column
-lm   -o ./cleanup-5.exe    (timeout = 300)
PASS: gcc.dg/cleanup-5.c (test for excess errors)
Setting LD_LIBRARY_PATH to :/xxx/gnu/gcc/objdir/gcc::/xxx/gnu/gcc/objdir/gcc
FAIL: gcc.dg/cleanup-5.c execution test

I find in debugging this failure that the tests fail because
init_dwarf_reg_size_table is not being called.  This leads to an
assert failure in _Unwind_SetSpColumn.

Sadly, checking must have been disabled in previous testing on this
target.  The problem doesn't occur in hpux11.11 because a fix was added
to the libc version of pthread_once to call init_dwarf_reg_size_table.
This was added in PHCO_29495. 

The fundamental problem is that threads are not active unless programs
are compiled and linked with -pthreads.  The shared version of libc
contains stub implementations of the pthread, and as noted the hpux11.00
stub for pthread_once doesn't call the init routine.

I think the simplest fix is to provide an hppa-hpux specific version of
__gthread_active_p():

/* Return TRUE is application is linked with libpthread.  */
extern int __get_ismt (void);
static inline int
__gthread_active_p (void)
{
  return __get_ismt () == 2;
}

__get_ismt() appears to have been introduced in PHCO_22923 on hpux11.00,
so we may need a configure test for it.  On the otherhand, I don't really
want to support old versions of libc.

The other approach to fixing this would be to always link against libpthread
when exception support is needed.


-- 
           Summary: All exception related tests fail
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa*-*-hpux11.00
  GCC host triplet: hppa*-*-hpux11.00
GCC target triplet: hppa*-*-hpux11.00


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33286



More information about the Gcc-bugs mailing list