This is the mail archive of the gcc@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]

Re: Is this a bug in libffi testsuite on solaris2.8?


> On the heap -- where's the problem?  This is no more likely to cause a
> memory leak than any other use of malloc().
> 
> Andrew.

I don't see that, if a user uses malloc, then it is up to the user to do the
free. here we have an implicit use of malloc, and the compiler must be
very careful to make sure this is freed on all possible paths (that means
of course introducing an exception handler at the current level to make
sure it gets freed if there is an exception -- that's straightforward in
C++ and Ada, but a bit odd in C, but I think necessary, a longjmp can
leave explicitly malloc'ed stuff still allocated, but not implicitly
allocated stuff.


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