On Sat, 2005-04-09 at 13:22 -0400, Richard Kenner wrote:
>     Ok the bug is trivial once I peek into the core dump:
> 
> No, you're missing it, I think.  When you're in GDB, what it does is
> raises an explicit constraint error due to Int'Value, which is what's
> expected.  However, for some reason when not under GDB, the handling
> of the exception causes some SIGSEGV.

The line shown in GDB is before the Int'Value. But you're partially
right in the case of Discrete_Random since it is generic, checks
are on, and an exception should happen on the first loop when Stop
reaches Coded_State'Last+1 (a-nudira.adb:237) and may be mishandled but
I'm unable to find trace of that with gdb on the core (I don't much
about GDB possibilities on a core file).

For Float_Random, it's not generic and so compiled with checks off in
the RTS, and the code has a latent buffer overflow bug.

Laurent


Reply via email to