[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#329693: marked as done (gnat: Run-time error not detected, RM 9.4(20))



Your message dated Wed, 02 May 2007 15:17:34 +0200
with message-id <87r6pzl5zl.fsf@ludovic-brenta.org>
and subject line #329691: gnat: Run-time error not detected, RM 9.4(20)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gnat
Version: 3.15p-13
Severity: normal
Tags: upstream

In the following program, the environment task deallocates a protected
object while a task is busy in it.  Per RM 9.4(20), the task should
receive a Program_Error.  In gnat 3.15p-13 and gnat-4.0 4.0.1-2, the
program teminates immediately but without an exception (no output).

with Ada.Exceptions;
with Ada.Text_IO;
with Ada.Unchecked_Deallocation;
procedure Raise_Program_Error is
   protected type P is
      procedure E;
   end P;

   protected body P is
      procedure E is
         G : Integer;
      begin
         for K in 1 .. 10 ** 8 loop
            G := K - 1 + K * (1 - K);
         end loop;
      exception
         when E : others =>
            Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
      end E;
   end P;

   task type T (Prot : access P);

   task body T is
   begin
      Prot.E;
   end T;

   type Access_T is access T;
   New_T : Access_T;
   type Access_P is access P;
   procedure Free is new Ada.Unchecked_Deallocation (Object => P,
                                                     Name => Access_P);
   New_P : Access_P := new P;
begin
   New_T := new T (New_P);
   Free (New_P);
exception
   when E : others =>
      Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
end Raise_Program_Error;


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-2-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gnat depends on:
ii  binutils                      2.16.1-2   The GNU assembler, linker and bina
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libc6-dev                     2.3.5-6    GNU C Library: Development Librari
ii  libgnat-3.15p-1               3.15p-13   The GNU Ada 95 compiler runtime li

Versions of packages gnat recommends:
ii  ada-reference-manual       20021112web-3 The standard describing the Ada 95
ii  gnat-gps                   2.1.0-5       The GNAT Programming System - adva

-- no debconf information



--- End Message ---
--- Begin Message ---
Upstream closed the bug as invalid with the following comment:

The program is erroneous here.

RN 9.4(20) is about protected entry queues, not about protected procedures
being executed while the object is deallocated.

Arno


--- End Message ---

Reply to: