public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/40285]  New: Including Ada.Real_Time.Timing_Events breaks signal handling
@ 2009-05-28 22:59 reet at codelabs dot ch
  2009-05-28 23:01 ` [Bug ada/40285] " reet at codelabs dot ch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: reet at codelabs dot ch @ 2009-05-28 22:59 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/40285] Including Ada.Real_Time.Timing_Events breaks signal handling
  2009-05-28 22:59 [Bug ada/40285] New: Including Ada.Real_Time.Timing_Events breaks signal handling reet at codelabs dot ch
@ 2009-05-28 23:01 ` reet at codelabs dot ch
  2009-05-28 23:02 ` reet at codelabs dot ch
  2009-05-28 23:03 ` reet at codelabs dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: reet at codelabs dot ch @ 2009-05-28 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reet at codelabs dot ch  2009-05-28 23:01 -------
Created an attachment (id=17926)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17926&action=view)
Simple application which uses a protected type for signal handling.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/40285] Including Ada.Real_Time.Timing_Events breaks signal handling
  2009-05-28 22:59 [Bug ada/40285] New: Including Ada.Real_Time.Timing_Events breaks signal handling reet at codelabs dot ch
  2009-05-28 23:01 ` [Bug ada/40285] " reet at codelabs dot ch
@ 2009-05-28 23:02 ` reet at codelabs dot ch
  2009-05-28 23:03 ` reet at codelabs dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: reet at codelabs dot ch @ 2009-05-28 23:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reet at codelabs dot ch  2009-05-28 23:02 -------
Created an attachment (id=17927)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17927&action=view)
Handlers package spec.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/40285] Including Ada.Real_Time.Timing_Events breaks signal handling
  2009-05-28 22:59 [Bug ada/40285] New: Including Ada.Real_Time.Timing_Events breaks signal handling reet at codelabs dot ch
  2009-05-28 23:01 ` [Bug ada/40285] " reet at codelabs dot ch
  2009-05-28 23:02 ` reet at codelabs dot ch
@ 2009-05-28 23:03 ` reet at codelabs dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: reet at codelabs dot ch @ 2009-05-28 23:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reet at codelabs dot ch  2009-05-28 23:03 -------
Created an attachment (id=17928)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17928&action=view)
Handlers package body.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-28 23:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-28 22:59 [Bug ada/40285] New: Including Ada.Real_Time.Timing_Events breaks signal handling reet at codelabs dot ch
2009-05-28 23:01 ` [Bug ada/40285] " reet at codelabs dot ch
2009-05-28 23:02 ` reet at codelabs dot ch
2009-05-28 23:03 ` reet at codelabs dot ch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).