[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #32708] sizeof() on a class with non-fragile ABI

From: Chris Armstrong
Subject: [bug #32708] sizeof() on a class with non-fragile ABI
Date: Tue, 08 Mar 2011 12:06:53 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20110303 Firefox/3.6.15


                 Summary: sizeof() on a class with non-fragile ABI
                 Project: GNUstep
            Submitted by: carmstrong
            Submitted on: Tue 08 Mar 2011 12:06:52 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



I was compiling the latest version of gnustep-base from SVN (revision 32500),
and I was running into trouble with NSDateFormatter and NSNumberFormatter,
which both use internal classes. Their -copyWithZone: implementations had code
like the following:

memcpy(o->_internal, internal, sizeof(NSDateFormatterInternal));

This code doesn't compile with clang and the -fnon-fragile-abi option because
(I presume) the class size is determined at runtime. I've provided a patch
below which fixes this problem by using the new class_getInstanceSize().


File Attachments:

Date: Tue 08 Mar 2011 12:06:52 PM GMT  Name:
gnustep_base-fix_sizeof_call.patch  Size: 1kB   By: carmstrong



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]