Re: Emit a variable defined in gcc

2020-07-02 Thread Martin Liška
On 7/2/20 8:12 AM, Harshit Sharma wrote: Thanks Martin. I liked your idea of using __builtin___asan_version_mismatch_check_v8(). But now, I am getting a compile error. ( error: implicit declaration of function '__builtin___asan_version_mismatch_check_v8'; ) It means the reference to this funct

Re: Emit a variable defined in gcc

2020-07-01 Thread Harshit Sharma via Gcc
Thanks Martin. I liked your idea of using __builtin___asan_version_mismatch_check_v8(). But now, I am getting a compile error. ( error: implicit declaration of function '__builtin___asan_version_mismatch_check_v8'; ) It means the reference to this function is not resolved. So, I guess gcc is not e

Re: Emit a variable defined in gcc

2020-07-01 Thread Martin Liška
On 7/1/20 10:54 AM, Harshit Sharma wrote: Actually these are two separate things. My callback function to fetch shadow offset from user code is ready. This function is defined in my user code and will be called by compiler (quite similar to how __asan_stack_malloc_ function is implemented in g

Re: Emit a variable defined in gcc

2020-07-01 Thread Harshit Sharma via Gcc
Actually these are two separate things. My callback function to fetch shadow offset from user code is ready. This function is defined in my user code and will be called by compiler (quite similar to how __asan_stack_malloc_ function is implemented in gcc/asan.c). Now in order to make sure that my

Re: Emit a variable defined in gcc

2020-07-01 Thread Martin Liška
On 6/30/20 6:52 PM, Harshit Sharma wrote: Hey Martin, Thanks for your reply. Actually I am trying to have a callback function allowing gcc to fetch shadow offset from runtime code. Ah, all right! In order to make sure that my users have applied this patch before using asan feature, I want

Re: Emit a variable defined in gcc

2020-06-30 Thread Harshit Sharma via Gcc
Hey Martin, Thanks for your reply. Actually I am trying to have a callback function allowing gcc to fetch shadow offset from runtime code. In order to make sure that my users have applied this patch before using asan feature, I want to define a variable in gcc (could be an integer) which will be

Re: Emit a variable defined in gcc

2020-06-30 Thread Martin Liška
On 6/30/20 7:55 AM, Harshit Sharma via Gcc wrote: Hello, I am working on a gcc patch for asan. Hey. Good to hear, what kind of feature is that? The patch is almost ready except one thing. To make sure that the user has applied this patch before using asan feature, I want to declare an additi

Emit a variable defined in gcc

2020-06-29 Thread Harshit Sharma via Gcc
Hello, I am working on a gcc patch for asan. The patch is almost ready except one thing. To make sure that the user has applied this patch before using asan feature, I want to declare an additional variable in gcc which is reference by our source code so that if this patch is missing, the user gets