ObjFW  Ticket Change Details

Overview

Artifact ID: 1b093eda3f402cd66ecf02a8e574599a2ca39aad5a50ae802b7aaad9ba0a8cb2
Ticket: ced9d8df0bc81123a789cc52723832d5009cfcec
Exceptions during init in ARC code crash on Windows
User & Date: js on 2020-06-07 14:37:19
Changes

  1. icomment:
    The following pattern crashes in ARC code on Windows, both i686 and x64:
    
    <pre><code>#import <ObjFW/ObjFW.h>
    
    @interface Test: OFObject <OFApplicationDelegate>
    @end
    
    @interface Test2: OFObject
    @end
    
    OF_APPLICATION_DELEGATE(Test)
    
    @implementation Test
    - (void)applicationDidFinishLaunching
    {
    	Test2 *t;
    
    	@try {
    		t = [[Test2 alloc] init];
    	} @catch (id e) {
    		of_log(@"Caught!");
    	}
    
    	[OFApplication terminate];
    }
    @end
    
    @implementation Test2
    - (instancetype)init
    {
    	self = [super init];
    
    	@throw [OFException exception];
    
    	return self;
    }
    
    - (void)dealloc
    {
    	of_log(@"Deallocated!");
    }
    @end
    </code></pre>
    
    This is most likely due to a compiler bug.
    
  2. login: "js"
  3. milestone changed to: "1.0"
  4. mimetype: "text/html"
  5. priority changed to: "Immediate"
  6. severity changed to: "Critical"
  7. status changed to: "Open"
  8. title changed to:
    Exceptions during init in ARC code crash on Windows
    
  9. type changed to: "Build_Problem"