Displaying 6 results from an estimated 6 matches for "s2_f4".
Did you mean:
s2_f2
2017 Apr 10
3
[RFC] Design of a TBAA sanitizer
...tion will handle the following?
>
> struct {
> int s1_f1;
> float s1_f2;
> int s1_f3;
> float s1_f4;
> } S1;
>
> struct {
> int s2_f1;
> float s2_f2;
> int *s2_f3; // to add some interest, suppose that sizeof(int) ==
> sizeof(int *)
> float s2_f4;
> } S2;
>
> S1 *s1; S2 *s2;
> ...
> s2 = (S1*)s1;
> s2->s2_f1 = 0; // allowed
> s2->s2_f2 = 0; // allowed
> s2->s2_f3 = 0; // not allowed
> s2->s2_f4 = 0; // not allowed
>
> Also, when you plan to set types for allocated memory?
The most-general thing...
2017 Apr 11
4
[RFC] Design of a TBAA sanitizer
...float s1_f2;
>> int s1_f3;
>> float s1_f4;
>> } S1;
>>
>> struct {
>> int s2_f1;
>> float s2_f2;
>> int *s2_f3; // to add some interest, suppose that sizeof(int)
>> == sizeof(int *)
>> float s2_f4;
>> } S2;
>>
>> S1 *s1; S2 *s2;
>> ...
>> s2 = (S1*)s1;
>> s2->s2_f1 = 0; // allowed
>> s2->s2_f2 = 0; // allowed
>> s2->s2_f3 = 0; // not allowed
>> s2->s2_f4 = 0; // not allowed
>>
>>...
2017 Apr 11
2
[RFC] Design of a TBAA sanitizer
...loat s1_f2;
> >> int s1_f3;
> >> float s1_f4;
> >> } S1;
> >>
> >> struct {
> >> int s2_f1;
> >> float s2_f2;
> >> int *s2_f3; // to add some interest, suppose that sizeof(int) ==
> >> sizeof(int *)
> >> float s2_f4;
> >> } S2;
> >>
> >> S1 *s1; S2 *s2;
> >> ...
> >> s2 = (S1*)s1;
> >> s2->s2_f1 = 0; // allowed
> >> s2->s2_f2 = 0; // allowed
> >> s2->s2_f3 = 0; // not allowed
> >> s2->s2_f4 = 0; // not allowed
> >...
2017 Apr 11
2
[RFC] Design of a TBAA sanitizer
...gt;> } S1;
> > > >>
> > > >> struct {
> > > >> int s2_f1;
> > > >> float s2_f2;
> > > >> int *s2_f3; // to add some interest, suppose that sizeof(int) ==
> > > >> sizeof(int *)
> > > >> float s2_f4;
> > > >> } S2;
> > > >>
> > > >> S1 *s1; S2 *s2;
> > > >> ...
> > > >> s2 = (S1*)s1;
> > > >> s2->s2_f1 = 0; // allowed
> > > >> s2->s2_f2 = 0; // allowed
> > > >> s2->s...
2017 Apr 11
2
[RFC] Design of a TBAA sanitizer
...t; >> struct {
> > > > > >> int s2_f1;
> > > > > >> float s2_f2;
> > > > > >> int *s2_f3; // to add some interest, suppose that sizeof(int) ==
> > > > > >> sizeof(int *)
> > > > > >> float s2_f4;
> > > > > >> } S2;
> > > > > >>
> > > > > >> S1 *s1; S2 *s2;
> > > > > >> ...
> > > > > >> s2 = (S1*)s1;
> > > > > >> s2->s2_f1 = 0; // allowed
> > > > >...
2017 Apr 04
8
[RFC] Design of a TBAA sanitizer
Hi everyone,
At EuroLLVM, Chandler and I chatted about the design for a potential
TBAA sanitizer. Here's my attempt to summarize:
C/C++ have type-based aliasing rules, and LLVM's optimizer can exploit
these given TBAA metadata added by Clang. Roughly, a pointer of given
type cannot be used to access an object of a different type (with, of
course, certain exceptions). Unfortunately,