Dmitry Boyarintsev wrote on Fri, 15 Apr 2016:
Does anyone know if cblocks are working for darwin-aarch64?
The tests in the testsuite work at least, both for ARM and AArch64.
The problem is that code seems to be failing on "setValueCahngeHandler" call. libobjc.A.dylib`objc_msgSend: 0x2469fa80 <+0>: cbz r0, 0x2469fabe ; <+62> 0x2469fa82 <+2>: ldr.w r9, [r0] -> 0x2469fa86 <+6>: ldrh.w r12, [r9, #0xc] ; EXC_BAD_ACCESS
This crash probably has nothing to do with with blocks. objc_msgSend is the dispatch routine to call an Objective-C method. Blocks are called in a different way. The location of the error here suggests that this Objective instance pointer is invalid.
I wonder if it's related to aarch64, is block parameter passed incorrectly?.
Even if that were the case, it wouldn't crash at that place in objc_msgSend. r0 contains the "self" pointer of the Objective-C instance. It's unrelated to the the value of any parameters.
I'm also using fpc-trunk some 2015-Nov revision. Should I just update to the latest fpc revision?
When using trunk, you should always use the latest version. Jonas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel