[LLVMbugs] [Bug 21530] New: Detect integer demotions in UBSan

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 11 09:28:56 PST 2014


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

            Bug ID: 21530
           Summary: Detect integer demotions in UBSan
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: y.gribov at samsung.com
                CC: kcc at google.com, llvmbugs at cs.uiuc.edu,
                    vonosmas at gmail.com, y.gribov at samsung.com
    Classification: Unclassified

UBSan currently does not check integer demotions i.e. casts from wider integer
type to a smaller one. This is indeed not undefined behavior but rather
implementation defined. Still, loosing higher bits when downcasting ints to
chars is a constant source of bugs and it would be nice to have an optional
check for it (like we already have for float-cast-overflow).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141111/e77fccc0/attachment.html>


More information about the llvm-bugs mailing list