Re: Compile-Time Optimizations

2014-01-07 Thread Konstantin Serebryany
> Right, and that of course could be a performance penalty as well. > >> >> > Then, cases like this: >> > >> > int glob; >> > int get_glob() { >> > return glob; >> > } >> > >> > can be handled trivially as it's known that sanitizing address of a >> > variable >> > referenced by name is a

Re: Compile-Time Optimizations

2014-01-02 Thread Dmitry Vyukov
On Thu, Jan 2, 2014 at 7:58 PM, Ivan Kosarev wrote: > On Monday, December 30, 2013 4:40:28 PM UTC+4, Dmitry Vyukov wrote: >> >> However, keep in mind the following aspects: >> 1. We would prefer to do checks before the memory access in order to >> not corrupt memory. This rules out some optimizati

Re: Compile-Time Optimizations

2014-01-02 Thread Ivan Kosarev
On Monday, December 30, 2013 4:50:23 PM UTC+4, Alexander Potapenko wrote: > > > I thought that some optimization cases mentioned on this page could be > > handled by segregating the sanitizing code from the accesses themselves. > Can you please elaborate what do you mean by segregation here? > I

Re: Compile-Time Optimizations

2014-01-02 Thread Ivan Kosarev
On Monday, December 30, 2013 4:40:28 PM UTC+4, Dmitry Vyukov wrote: > > However, keep in mind the following aspects: > 1. We would prefer to do checks before the memory access in order to > not corrupt memory. This rules out some optimizations based on > post-dominance. > Good point. Obviously

Re: Compile-Time Optimizations

2013-12-30 Thread Alexander Potapenko
> I thought that some optimization cases mentioned on this page could be > handled by segregating the sanitizing code from the accesses themselves. Can you please elaborate what do you mean by segregation here? Is it actually treating the sanitizing code as function calls taking the variables as pa

Re: Compile-Time Optimizations

2013-12-30 Thread Dmitry Vyukov
On Mon, Dec 30, 2013 at 4:29 PM, Ivan Kosarev wrote: > First of all, let me state it once more that the sanitizers help a lot with > finding bugs in large-scale projects. Thank you gentlemen for your effort! > > Then, one of the ASAN wiki pages at: > > https://code.google.com/p/address-sanitizer/w

Compile-Time Optimizations

2013-12-30 Thread Ivan Kosarev
First of all, let me state it once more that the sanitizers help a lot with finding bugs in large-scale projects. Thank you gentlemen for your effort! Then, one of the ASAN wiki pages at: https://code.google.com/p/address-sanitizer/wiki/CompileTimeOptimizations discusses some ways to optimize i