This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug ada/40285] New: Including Ada.Real_Time.Timing_Events breaks signal handling


This issue has also been discussed on the comp.lang.ada newsgroup, see
[1] for details.

Signal-handling using a protected type as handler is not possible any more if
an application includes the Ada.Real_Time.Timing_Events package. It's not
necessary to actually use types from the package, including it is enough to
break signal handling.

I wrote a small reproducer to illustrate the problem, the files are attached.

The protected object Signal_Handler defined in the package Handlers is used as
a signal handler, which can be attached to a specific interrupt/signal.

The Signal_Handler type is used in the small test application implemented as
procedure Interrupt_Problem in the interrupt_problem.adb file.

As expected, when sending SIGTERM (or other signals) to the running
'Interrupt_Problem' process "Interrupt received ..." is displayed.

When the Ada.Real_Time.Timing_Events package is included, this mechanism
breaks. The signal handler is not invoked any more when signals are sent to a
running 'Interrupt_Problem' process, the Handler.Wait entry is not triggered.

The problem seems to have various characteristics on different architectures,
see the newsgroup thread [1].

gnatgcc -v output:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)

--

[1] -
http://groups.google.com/group/comp.lang.ada/browse_thread/thread/e69505d5161d7d41


-- 
           Summary: Including Ada.Real_Time.Timing_Events breaks signal
                    handling
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reet at codelabs dot ch
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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