Displaying 4 results from an estimated 4 matches for "global_array".
2020 Jul 15
2
[MTE] Tagging Globals
...stack variables are tagged by an instrumentation pass and heap objects are handled by the allocator (Scudo).
How about global variables? We tried a simple case using -march=armv8a+memtag -fsanitize=memtag, but found no tagging:
Are we missing anything or tagging globals is still in progress?
int global_array[16];
int main(int argc, char **argv) {
global_array[1] = 0;
return global_array[argc + 16]; // BOOM
}
clang++ -O1 --target=aarch64-linux -march=armv8.5a+memtag -fsanitize=memtag test.cpp -S -o test.s
main: // @main
.Lmain$local:
// %bb.0:...
2020 Jul 15
2
[MTE] Tagging Globals
...stack variables are tagged by an instrumentation pass and heap objects are handled by the allocator (Scudo).
How about global variables? We tried a simple case using -march=armv8a+memtag -fsanitize=memtag, but found no tagging:
Are we missing anything or tagging globals is still in progress?
int global_array[16];
int main(int argc, char **argv) {
global_array[1] = 0;
return global_array[argc + 16]; // BOOM
}
clang++ -O1 --target=aarch64-linux -march=armv8.5a+memtag -fsanitize=memtag test.cpp -S -o test.s
main: // @main
.Lmain$local:
// %bb.0:...
2020 Jul 15
2
[MTE] Tagging Globals
...objects are handled by the allocator (Scudo).
>
>
>
> How about global variables? We tried a simple case using
> -march=armv8a+memtag -fsanitize=memtag, but found no tagging:
>
>
>
> Are we missing anything or tagging globals is still in progress?
>
>
>
> *int global_array[16];*
>
>
>
> *int main(int argc, char **argv) {*
>
> * global_array[1] = 0;*
>
> * return global_array[argc + 16]; // BOOM*
>
> *}*
>
>
>
> clang++ -O1 --target=aarch64-linux -march=armv8.5a+memtag
> -fsanitize=memtag test.cpp -S -o test.s
>
>...
2014 Oct 28
2
[LLVMdev] Storing values in global variables
...(until now quite careless) use of
the different contexts. And this is where I could need help. The
special case I am stuck at is about storing a value in a global
variable. Here is some code:
IRBuilder<> builder(pi);
Value *elem = builder.CreateCall(...);
Value *elem_ptr = builder.CreateGEP(global_array, idx);
builder.CreateStore(get_crypted_funcptr(func, builder), elem_ptr);
I get a IRBuilder before some instruction (pi) in main. The element I
want to store (elem) is created by some call instruction which I
create via the builder. To store elem in global_array, I need a
pointer, which I get via...