Opened 6 years ago

Closed 6 years ago

#1318 closed defect (fixed)

(require 'cocoa) doesn't work with lisp built on OS X 10.11

Reported by: rme Owned by: rme
Priority: major Milestone:
Component: Objective-C Bridge Version: trunk
Keywords: Cc:

Description

After doing (rebuild-ccl :full t) on an OS X 10.11 system, (require 'cocoa) will fail by crashing into the lisp kernel debugger. A slightly simpler test case is (require 'objc-support), but that doesn't fully exercise things.

As I mentioned earlier today, I believe that this is (at least in part) because Objective-C isa pointers are not necessarily pointers any more.

Starting the lisp with the environment variable OBJC_DISABLE_NONPOINTER_ISA set to YES will enable the (require 'cocoa) to succeed.

$ env OBJC_DISABLE_NONPOINTER_ISA=YES ccl

(I found this out on http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_explain_Non-pointer_isa.html)

Change History (4)

comment:1 Changed 6 years ago by gb

  • Owner changed from rme to gb
  • Status changed from new to assigned

comment:2 Changed 6 years ago by rme

  • Owner changed from gb to rme
  • Status changed from assigned to new

comment:3 Changed 6 years ago by rme

  • Status changed from new to assigned

comment:4 Changed 6 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [16621]) Use Objective-C runtime API functions instead of looking directly at the isa pointers in the objc_object or objc_class structures. This is necessary because the value in the isa field is sometimes not an actual pointer.

Also, in objc-support.lisp, relocate a bit of code to appear earlier in the file, since it ends up being called sooner on OS X 10.11.

Closes ticket:1318.

Note: See TracTickets for help on using tickets.