[llvm] r179111 - Revert r176408 and r176408 to address PR15540.
Shuxin Yang
shuxin.llvm at gmail.com
Sat Apr 13 23:33:15 PDT 2013
On 4/13/13 11:19 PM, Nuno Lopes wrote:
> Hi,
>
> In summary, I would like to reapply r176407, yes.
> The reason is that it is the correct fix for PR15540. This new
> function, getUnderlyingObjectSize(), gives exactly the semantics that
> BasicAA wants (which is to get the size of the object pointed by a
> given pointer).
To be pedantic, BasicAA need min-size-of-all-potential-object pointed by
the pointer in question.
> The function getObjectSize(), on the other hand, gives the size of an
> object minus the offset of the given pointer. Using getObjectSize() is
> therefore wrong (I wrote that code, but later I realized my mistake).
Before the r176407, the compiler avoid the problem by *NOT* evaluating
the size if the pointer does not points to a object.
>
> I believe r176407 is the correct fix, and it should be reapplied.
>
Then come up an example to prove r176407-1 dose not work.
More information about the llvm-commits
mailing list