gnustep-dev
[Top][All Lists]
Advanced

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

CoreBase problem with INIT_CFRUNTIME_BASE


From: Sergio L. Pascual
Subject: CoreBase problem with INIT_CFRUNTIME_BASE
Date: Mon, 04 Apr 2016 18:12:59 +0200

Hi,

On my machine, 32 tests of CoreBase are failing like this:

CFRuntime.c:381: CFTypeRef CFRetain(CFTypeRef): Assertion `result <
2147483647' failed.

I've traced down the problem to these lines
(Headers/CoreFoundation/CFRuntime.h:126):

<---- snip ---->
struct __CFRuntimeBase
{
  void *_isa;
    /**< The Objective-C class for this object.  Used for the
Objective-C
         bridge.  <em>For internal use only.</em> */
  SInt16 _typeID;
  struct
    {
      SInt16 ro:       1;
      SInt16 reserved: 7;
      SInt16 info:     8;
    } _flags;
};

//#define INIT_CFRUNTIME_BASE(...) { 0, 0, { 1, 0, 0 } }
#define INIT_CFRUNTIME_BASE(...) { 0, 0x00008000 }
<---- snip ---->

With the uncommented definition, _flags.ro is left uninitialized, which
causes problems later when CFRetain checks it to see if the object has
a "retained" field. The commented version works fine.

This new definition was introduced in the last commit. Was that an
intended change? Am I missing something?

Sergio.



reply via email to

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