Re: [ubsan] Add libcall arguments

2013-07-22 Thread Jason Merrill
On 07/19/2013 02:45 PM, Marek Polacek wrote: /* This type represents an entry in the hash table. */ struct ubsan_typedesc { + /* This represents the type of a variable. */ tree type; + + /* This is the VAR_DECL of the type. */ tree decl; }; What I was looking for was something

Re: [ubsan] Add libcall arguments

2013-07-22 Thread Marek Polacek
On Mon, Jul 22, 2013 at 10:09:00AM -0400, Jason Merrill wrote: On 07/19/2013 02:45 PM, Marek Polacek wrote: /* This type represents an entry in the hash table. */ struct ubsan_typedesc { + /* This represents the type of a variable. */ tree type; + + /* This is the VAR_DECL of the

Re: [ubsan] Add libcall arguments

2013-07-18 Thread Jason Merrill
On 07/05/2013 10:04 AM, Marek Polacek wrote: +/* This type represents an entry in the hash table. */ Please describe the hash table more up here. What are you tracking? + hashval_t h = iterative_hash_object (data-type, 0); + h = iterative_hash_object (data-decl, h); If you hash the

[ubsan] Add libcall arguments

2013-07-05 Thread Marek Polacek
This patch adds creating and passing the arguments for the ubsan library. So, we can finally make use of the ubsan library. We currently sanitize only divisions by zero and shifts. What it can do now is e.g. for: int main (void) { long int a = 4; int b = 113; return a b; } it at runtime says: