This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix failure of gfortran.dg/backtrace_1.f90 on hppa*-*-hpux*


The hppa*-*-hpux* target does not support __sync builtins.  As a result, libbacktrace does not
support backtraces when threads are active.

Instead of always assuming threads are active in libgfortran/runtime/backtrace.c, the attached
patch uses __gthread_active_p() to determine whether threads are active or not.  In addition,
if backtrace_create_state returns NULL, we just return from show_backtrace().  This avoids a
segmentation fault when threads are active.

This fixes the failure of gfortran.dg/backtrace_1.f90 on hpux.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

Okay for trunk?

Dave
--
John David Anglin	dave.anglin@bell.net


Attachment: backtrace.c.d.2.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]