Skip to content

GNUstep Objective-C Runtime 2.1

Compare
Choose a tag to compare
@davidchisnall davidchisnall released this 23 Aug 15:15
· 74 commits to master since this release

This is the first update to the second major release of the GNUstep Objective-C
runtime (a.k.a. libobjc2). This runtime was designed to support the features
of modern dialects of Objective-C for use with GNUstep and other Objective-C
programs.

NOTE: This is the first release to use submodules. If you are downloading
the sources from git, please make sure that you do a recursive clone. If you
forget, the build system will give you instructions to correct this.
Tarballs from GitHub do not include submodules, so if you are downloading the
tarball then you will need to download the submodule separately.

Highlights of this release include:

  • Numerous improvements to the Objective-C++ exception interoperation code.
    The runtime now dynamically detects whether the libcxxrt or libsupc++ variant
    of the Itanium C++ Exception ABI is being used

  • Sending a message to super where the corresponding method did not exist was
    silently ignored in previous versions of the runtime. This now correctly
    invokes the forwarding hooks and so (with an implementation of the Foundation
    framework, such as GNUstep Base or WinObjC) will trigger an exception or
    invoke forwardInvocation:.

  • The checks for overloaded memory management methods were incorrect, causing
    some classes to be incorrectly opted into ARC fast paths. These checks are
    now correct.

  • Several memory management bugs in corner cases of weak reference management
    were fixed.

  • The ARM assembly implementation of objc_msgSend now correctly restores the
    stack after calling a forwarding implementation. This bug caused stack
    corruption and usually crashing on ARM.

  • The ARC code has been rewritten as C++, using a well-tested third-party
    Robin-Hood hash table to store weak references, replacing the home-grown
    version. This improves performance and reduces the likelihood of bugs
    arising from the hash table implementation.

  • Control Flow Guard (CGF) checks were added on Windows on x86 (32- and
    64-bit). If Objective-C code is compiled with CFG enabled then
    objc_msgSend will crash if it attempts to jump to an address that is not a
    valid function entry point.

  • The function signatures in the blocks headers were updated for compatibility
    with recent macOS releases.

  • Support for the C11 _Atomic type qualifier in property metadata was added.

You may obtain the code for this release from git and use the 2.1 branch:

https://github.com/gnustep/libobjc2.git

Alternatively, a tarball is available from:

https://github.com/gnustep/libobjc2/archive/v2.1.zip
https://github.com/gnustep/libobjc2/archive/v2.1.tar.gz

The submodule is available from:

https://github.com/Tessil/robin-map/archive/757de82.zip
https://github.com/Tessil/robin-map/archive/757de82.tar.gz

This will extract as robin-map-757de829927489bee55ab02147484850c687b620.
You must move the contents of that directory into third_party/robin_map in the
libobjc2 tree.

The runtime library is responsible for implementing the core features of the
object model, as well as exposing introspection features to the user. The
GNUstep runtime implements a superset of Apple's Objective-C Runtime APIs.

If you come across any problems, please file them in the issue tracker:

https://github.com/gnustep/libobjc2/issues