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/6910] When I run this code it segfaults.


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bam@snoopy.apana.org.au  2003-05-27 06:21 -------
Subject: Re:  When I run this code it segfaults.

On Tue, May 27, 2003 at 06:10:35AM -0000, dhazeghi@yahoo.com wrote:
> would it be possible for you to determine whether this problem is still present with gcc 3.3? If not, 
> can you provide instructions on how to build your testcase. It doesn't appear to be self-contained 
> (won't build for me, referencing stuff from XmlAda, where can I find that?). Thanks.

I tried to close this bug earlier, but couldn't. I got a lot of message
bounces, lets hope this doesn't bounce.

The problem is that GNAT.Dynamic_Tables is (IMHO) an ugly hack, as it
allocates memory with the C malloc function.

This means that you can only use GNAT.Dynamic_Tables to store objects
that are not controlled types.

I was trying to store a controlled type, hence I got unpredictable
behaviour as malloc doesn't support Ada controlled types.

The solution is to use an external library for storing objects,
eg. Booch Components, and not use GNAT.Dynamic_Tables.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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