[llvm-bugs] [Bug 33430] New: [ubsan] false negative: pointer overflow check misses subtractions with unsigned offsets
llvm-bugs at lists.llvm.org
Mon Jun 12 15:05:00 PDT 2017
Bug ID: 33430
Summary: [ubsan] false negative: pointer overflow check misses
subtractions with unsigned offsets
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: vsk at apple.com
CC: llvm-bugs at lists.llvm.org
This has been a problem with the pointer overflow check since it was introduced
An example from Eli: "p - SIZE_MAX" gets converted into (gep p 0 1), so
EmitCheckedInBoundsGEP expects the result of the gep to be "greater than" p.
This is wrong.
We should always expect "ptrtoint(p - <unsigned>) <= ptrtoint(p)".
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs