[LLVMdev] SAFECode Source Code Released
Török Edwin
edwintorok at gmail.com
Tue Nov 17 00:55:38 PST 2009
On 2009-11-17 10:43, John McCall wrote:
> Török Edwin wrote:
>> Ok, then converting from void** to PoolSlab** can be done by going
>> through void* as an intermediary type?
>>
>
> The violation is not in how you're converting the void** to a
> PoolSlab**. That array is forever and always an array of void*s, and
> no amount of conversion will make it not a strict-aliasing violation
> to load PoolSlab*s from it. All your patch is doing is introducing
> enough indirection to disable the warning.
>
> The only ways to avoid the aliasing violation are to (1) have the
> array be a PoolSlab** in the first place or (2) actually read and
> write void*s from the array, casting to and from PoolSlab* as
> appropriate.
In this case changing the field type from void* to PoolSlab* worked (I
don't know why it had to be a void* in the first place).
Now SAFEcode (excluding the SVA runtime which I disabled in my patch)
builds.
Best regards,
--Edwin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091117/a0914a5c/attachment.ksh>
More information about the llvm-dev
mailing list