[LLVMdev] Question about node collapse

John Criswell jtcriswel at gmail.com
Tue Dec 16 09:34:44 PST 2014

On 12/16/14, 12:00 PM, Zvonimir Rakamaric wrote:
> Hi John,
> I have a follow up question about TypeSafety and would appreciate your help.
> So we've been studying its implementation, and in particular the
> function typeFieldsOverlap. As it turns out, the current
> implementation of that function does not catch an overlap of fields if
> they start at the same offset. For example, this would not be caught
> as a field overlap since x and y are at the same offset (if though
> they are of different types and type sizes):
> int *x = 5;
> char *y = x;
> *y = 3;
> On the other hand, this would be caught since x and y are not at the
> same offset:
> int *x = 5;
> char *y = x;
> *(y+1) = 3;
> Do you maybe know if such behavior is a feature of TypeSafety or a bug?

I think that it is a bug.  Please feel free to file a bug report for it.

Are you able to fix the code yourself, or do you need assistance? I'm a 
bit swamped with end-of-the-semester work.


John Criswell

John Criswell
Assistant Professor
Department of Computer Science, University of Rochester

More information about the llvm-dev mailing list