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

libobjc sarray.c patch (Bug 11904)


Hello all,

This is in response to bug 11904:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11904

This patch basically fixes two problems, first off, the 
original source was only decrementing the reference count 
if the reference count was 1 (doesn't make much sense).

Secondly, the code following the freeing of the original 
sarray goes through and checks members of certain structures 
that can already be freed such as bkt->version.version on line
430 (before the patch) in a lazy copy's sarray_free, so I 
moved the freeing of the original to the end of the function
so that everything is still valid throughout the rest of the
function.

The patch applies to both sarray.c in 3.3 and sarray.c in 3.4.

Thanks,
Andy

_______________
Andrew E. Ruder

Attachment: sarray.c.patch
Description: Binary data


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