On Sat, Apr 16, 2016 at 5:42 PM, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote:
> > Yes, a test program that can be used to reproduce the bug (preferably > command line) > > even better! it's pure OSX (x86_64)! not need for iOS http://bugs.freepascal.org/view.php?id=30022 The sample is using block-based APIs of NSFileHandle https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileHandle_Class/ to be honest. I've no idea how the method should work, but I'd expect it shouldn't throw an access violation. It feels like the problem arrises when the run time tries to copy the block. The sample with NSArrays traversing doesn't try to retain the block, instead it just calls it right away. Yes, that's what optional field means (as opposed to field that is > optionally initialised or so). You can check the clang source code too: > http://llvm.org/svn/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp > Got it! thanks, Dmitry
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel