search for: _ztv1c

Displaying 9 results from an estimated 9 matches for "_ztv1c".

Did you mean: _ztv1b
2015 Jan 27
7
[LLVMdev] IR extension proposal: bitset constants
...To give a concrete example, suppose we have the following classes: struct A { virtual void f(); }; struct B : A { virtual void f(), g(); }; struct C : A { virtual void f(), h(); }; with the following vtables: _ZTV1A = { &A::rtti, &A::f }; _ZTV1B = { &B::rtti, &B::f, &B::g }; _ZTV1C = { &C::rtti, &C::f, &C::h }; The set of valid vtables for static class A is {&_ZTV1A[1], &_ZTV1B[1], &_ZTV1C[1]}, for B is {&_ZTV1B[1]} and for C is {&_ZTV1C[1]}. The toolchain would lay out _ZTV1A, _ZTV1B and _ZTV1C consecutively, and generate bit sets like this:...
2015 Jan 28
3
[LLVMdev] IR extension proposal: bitset constants
...truct A { virtual void f(); }; >> struct B : A { virtual void f(), g(); }; >> struct C : A { virtual void f(), h(); }; >> >> with the following vtables: >> >> _ZTV1A = { &A::rtti, &A::f }; >> _ZTV1B = { &B::rtti, &B::f, &B::g }; >> _ZTV1C = { &C::rtti, &C::f, &C::h }; >> >> The set of valid vtables for static class A is {&_ZTV1A[1], &_ZTV1B[1], >> &_ZTV1C[1]}, for B is {&_ZTV1B[1]} and for C is {&_ZTV1C[1]}. The >> toolchain >> would lay out _ZTV1A, _ZTV1B and _ZTV1C cons...
2015 Jan 29
3
[LLVMdev] IR extension proposal: bitset constants
...), g(); }; > > >> struct C : A { virtual void f(), h(); }; > > >> > > >> with the following vtables: > > >> > > >> _ZTV1A = { &A::rtti, &A::f }; > > >> _ZTV1B = { &B::rtti, &B::f, &B::g }; > > >> _ZTV1C = { &C::rtti, &C::f, &C::h }; > > >> > > >> The set of valid vtables for static class A is {&_ZTV1A[1], > &_ZTV1B[1], > > >> &_ZTV1C[1]}, for B is {&_ZTV1B[1]} and for C is {&_ZTV1C[1]}. The > > >> toolchain > &gt...
2015 Jan 30
0
[LLVMdev] IR extension proposal: bitset constants
...ollowing classes: > > struct A { virtual void f(); }; > struct B : A { virtual void f(), g(); }; > struct C : A { virtual void f(), h(); }; > > with the following vtables: > > _ZTV1A = { &A::rtti, &A::f }; > _ZTV1B = { &B::rtti, &B::f, &B::g }; > _ZTV1C = { &C::rtti, &C::f, &C::h }; > > The set of valid vtables for static class A is {&_ZTV1A[1], &_ZTV1B[1], > &_ZTV1C[1]}, for B is {&_ZTV1B[1]} and for C is {&_ZTV1C[1]}. The toolchain > would lay out _ZTV1A, _ZTV1B and _ZTV1C consecutively, and generate...
2015 Jan 31
2
[LLVMdev] IR extension proposal: bitset constants
...d have these bitsets: !llvm.bitsets = !{!0, !1, !2, !3, !4} !0 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1A, i32 0, i32 2)} !1 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 2)} !2 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 2)} !3 = !{!"1B", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 2)} !4 = !{!"1C", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 2)} The LLVM linker can already merge the contents of named metadata globals. The intrinsic for reading from bi...
2015 Jan 31
0
[LLVMdev] IR extension proposal: bitset constants
...bitsets = !{!0, !1, !2, !3, !4} > > !0 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1A, i32 0, i32 > 2)} > !1 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 > 2)} > !2 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 > 2)} > !3 = !{!"1B", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 > 2)} > !4 = !{!"1C", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 > 2)} > > The LLVM linker can already merge the contents of named metadata globals....
2015 Jan 31
0
[LLVMdev] IR extension proposal: bitset constants
Trying to summarize all opinions expressed here: Peter is proposing an initial implementation that would only work with LTO. Folks seem put off by this implementation affecting IR without having proven itself, and having shortcomings (as Jim pointed out). Kostya proposed going through metadata (and Chris kind of did too by mentioning tbaa), but Peter points out that this will make the
2015 Jan 31
2
[LLVMdev] IR extension proposal: bitset constants
...} > > > > !0 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1A, i32 0, i32 > > 2)} > > !1 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 > > 2)} > > !2 = !{!"1A", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 > > 2)} > > !3 = !{!"1B", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1B, i32 0, i32 > > 2)} > > !4 = !{!"1C", i8* getelementptr inbounds ([3 x i8*]* @_ZTV1C, i32 0, i32 > > 2)} > > > > The LLVM linker can already merge the c...
2015 Jan 30
2
[LLVMdev] IR extension proposal: bitset constants
Hi Chris, I wanted to start by giving an explanation of what I am trying to achieve and how I am trying to achieve it. I am working towards introducing into LLVM a security mechanism, Forward Control Flow Integrity (CFI), that is designed to mitigate against vulnerabilities that allow attacks based on corrupting vtable or function pointers in memory in order to subvert a program's control