Problem with instrumenting GIMPLE for adding a global variable

2005-08-20 Thread Prateek Saxena
Hi, I am trying to implement a prototype pass that instruments a function to check for safe memory accesses. As a starting point I looked at mudflap1 pass, in tree-mudflap.c and decided that I should write a dummy pass ( very simple, but similar to mudflap) that instruments the code to count the n

Re: Problem with instrumenting GIMPLE for adding a global variable

2005-08-20 Thread Prateek Saxena
Sorry, my mistake. I initialized it with a value, and it appeared in the .data. :) > Hi, > > I am trying to implement a prototype pass that instruments a function > to check for safe memory accesses. As a starting point I looked at > mudflap1 pass, in tree-mudflap.c and decided that I should wr

question about pass management

2005-08-31 Thread Prateek Saxena
Hi, I have to run a pass which modifies the function types of all functions in a a C file, by adding an extra parameter to each function. If this pass runs like all other optimization passes, then this pass runs when each function is being processed. So, for a prog like this: int my_funct(in

Code getting optimized away after instrumenation for memory analysis

2005-11-18 Thread Prateek Saxena
Hello, I am doing some code instrumentation for program memory access validation using gcc-4.1 head. For every assignment, p=q I pass the address of the operands, "&p" and "&q" to an external library function. This works fine at O0, but at O1, some legitimate code gets optimized away. In the dum

Re: Code getting optimized away after instrumenation for memory analysis

2005-11-18 Thread Prateek Saxena
update started at block: -1 Number of blocks in CFG: 6 Number of blocks to update: 5 ( 83%) = On 11/18/05, Diego Novillo <[EMAIL PROTECTED]> wrote: > On Friday 18 November 2005 04:13, Prateek Saxena wrote: > > > At this point, the stmt: > > > > # VUSE

Accessing the file scope C++ data structs in GIMPLE

2006-01-03 Thread Prateek Saxena
Hello, I want to dump out all the c++ classes/structs and global data structures defined in a given file scope or transaltion unit, as part of the debug dumps in C-like syntax, from GIMPLE data structs. Is there a TREE_VEC or BIND_EXPR_VARS that I can traverse through and get all these ? Thanks

Re: Security vulernarability or security feature?

2008-04-24 Thread Prateek Saxena
On Thu, Apr 24, 2008 at 2:20 PM, Ralph Loader <[EMAIL PROTECTED]> wrote: > > I am very interested in seeing how this optimization can remove > > arithmetic overflows. > > int foo (char * buf, int n) > { > // buf+n may overflow of the programmer incorrectly passes > // a large val