[LLVMbugs] [Bug 8688] New: Copying block that captures itself in its declaration leads to garbage

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 24 14:58:06 PST 2010


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: unassignedbugs at nondot.org
        ReportedBy: kevin at sb.org
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list