[LLVMbugs] [Bug 13853] New: Null checks against weakly leaked symbols without __attribute__((weak_import)) should produce a warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 14 19:53:33 PDT 2012


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

             Bug #: 13853
           Summary: Null checks against weakly leaked symbols without
                    __attribute__((weak_import)) should produce a warning
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: doug at getitdownonpaper.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


If a framework is weakly leaked and code is doing a null check for the symbol,
but the symbol is not qualified with __attribute__((weak_import)) there should
be a warning that this check will be optimized out.

A framework being shipped without the correct qualifier can cause correct
client code to crash without the cause being immediately obvious.

Originally filed as http://llvm.org/bugs/show_bug.cgi?id=13852 and related to
http://www.openradar.me/12305923

-- 
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