comp.lang.ada
 help / color / mirror / Atom feed
* Weird bug - Protected object - Gnat 3.15p win32
@ 2004-07-11 15:29 Jano
  2004-07-11 15:56 ` Ludovic Brenta
  2004-07-11 19:26 ` Jeffrey Carter
  0 siblings, 2 replies; 10+ messages in thread
From: Jano @ 2004-07-11 15:29 UTC (permalink / raw)


Hi Ada men,

I think I've stumbled across another mortifying bug 
in gnat 3.15p win32, another one which has taken a lot 
of time to track down. Please share any knowledge you 
have about it:

The thing is that I have a protected type with a lot
of functions and quite some encapsulated data. Sud-
denly it has started to cause deadlocks. After any call
to a function (not procedure!) in the protected type, the
lock of the monitor is not released for some reason, 
because any subsequent call to the object will lock and
not enter it. The function can have null body, no other
tasks are using the protected object.

After tinkering around, I've detected that changing the
following private member declaration makes the deadlock
to go away:

protected type Blah is
   -- procedures and functions
private

   Some_Array : Array_Type (1 .. 1); 
      -- Will work ok
   Some_Array : Array_Type (1 .. Global_Variable); 
      -- Will deadlock

end Blah;

Note that Global_Variable also equals to 1!

I've tried to get a small reproducer using new code, but
failed, so there must be some other dependences for it 
to arise. Using the code from the project where I've detected
it, it happens for every instance of the protected type.

Someone has noticed something like this?

Having been bitten hard at least twice by gnat bugs in 
3.15p win, I'm thinking of making a bugs page for other 
people to be warned ahead. I'm already aware of the 
following:

* The broken time packages.
* The broken Select in Gnat.Sockets.

If you're aware of such kind of bugs which are hard to 
detect and track down, please write about them so I can
collect them for reference. I think it can spare useful
time to newcomers.

Thanks!



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

end of thread, other threads:[~2004-07-13 12:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 15:29 Weird bug - Protected object - Gnat 3.15p win32 Jano
2004-07-11 15:56 ` Ludovic Brenta
2004-07-12  8:48   ` Jano
2004-07-11 19:26 ` Jeffrey Carter
2004-07-12  8:57   ` Jano
2004-07-12 16:07     ` Nick Roberts
2004-07-12 16:37       ` Jano
2004-07-12 17:00         ` Nick Roberts
2004-07-13  1:13         ` Jeffrey Carter
2004-07-13 12:03           ` Jano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox