http://llvm.org/bugs/show_bug.cgi?id=8688

           Summary: Copying block that captures itself in its declaration
                    leads to garbage
           Product: new-bugs
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=5827)
 --> (http://llvm.org/bugs/attachment.cgi?id=5827)
Test case

Calling Block_copy() during the declaration of a block variable that captures
itself results in a garbage value. The following snippet is all that's
necessary to reproduce:

    __block void (^broken)() = Block_copy(^{ (void)broken; });

I've attached a complete file that reproduces this issue when run.

This was reproduced in both Apple clang version 1.6 (tags/Apple/clang-70) and
Apple clang version 2.0 (tags/Apple/clang-121.4) (based on LLVM 2.9svn), in
both x86_64 and i386.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to