https://codereview.appspot.com/6446107/diff/4001/asan_report.cc File asan_report.cc (right): https://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode48 asan_report.cc:48: for (uptr i = 0; i < byte_num; i++) { ++i is more stylistically preferable, but looks like we're not using it at all in ASan codebase. https://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); How about writing a loop here? https://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); Please also fix the spacing between the operators. https://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode218 asan_report.cc:218: AsanPrintf("AddressSanitizer: while reporting a bug found another one." It's better to use AsanReport() here. https://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode220 asan_report.cc:220: SleepForSeconds(5); I think we should sleep for |sleep_before_dying| seconds here. Keep in mind that Clang may replace the current while(1) loop with a call to _exit(1), so we should either enforce it or let the user to control the sleep time.
http://codereview.appspot.com/6446107/diff/4001/asan_report.cc File asan_report.cc (right): http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode48 asan_report.cc:48: for (uptr i = 0; i < byte_num; i++) { On 2012/08/10 12:03:50, glider1 wrote: > ++i is more stylistically preferable, but looks like we're not using it at all > in ASan codebase. Yeah, "i++" vs. "++i" = 27:0. I'll leave it as is for consistency. http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); On 2012/08/10 12:03:50, glider1 wrote: > Please also fix the spacing between the operators. Done. http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); On 2012/08/10 12:03:50, glider1 wrote: > How about writing a loop here? Done. http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode218 asan_report.cc:218: AsanPrintf("AddressSanitizer: while reporting a bug found another one." On 2012/08/10 12:03:50, glider1 wrote: > It's better to use AsanReport() here. Done. http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode220 asan_report.cc:220: SleepForSeconds(5); On 2012/08/10 12:03:50, glider1 wrote: > I think we should sleep for |sleep_before_dying| seconds here. > Keep in mind that Clang may replace the current while(1) loop with a call to > _exit(1), so we should either enforce it or let the user to control the sleep > time. Done.
On 2012/08/10 14:34:58, samsonov wrote: > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc > File asan_report.cc (right): > > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode48 > asan_report.cc:48: for (uptr i = 0; i < byte_num; i++) { > On 2012/08/10 12:03:50, glider1 wrote: > > ++i is more stylistically preferable, but looks like we're not using it at all > > in ASan codebase. > > Yeah, "i++" vs. "++i" = 27:0. I'll leave it as is for consistency. > > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 > asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); > On 2012/08/10 12:03:50, glider1 wrote: > > Please also fix the spacing between the operators. > > Done. > > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode63 > asan_report.cc:63: PrintBytes(" ", (uptr*)(aligned_shadow-4*kWordSize)); > On 2012/08/10 12:03:50, glider1 wrote: > > How about writing a loop here? > > Done. > > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode218 > asan_report.cc:218: AsanPrintf("AddressSanitizer: while reporting a bug found > another one." > On 2012/08/10 12:03:50, glider1 wrote: > > It's better to use AsanReport() here. > > Done. > > http://codereview.appspot.com/6446107/diff/4001/asan_report.cc#newcode220 > asan_report.cc:220: SleepForSeconds(5); > On 2012/08/10 12:03:50, glider1 wrote: > > I think we should sleep for |sleep_before_dying| seconds here. > > Keep in mind that Clang may replace the current while(1) loop with a call to > > _exit(1), so we should either enforce it or let the user to control the sleep > > time. > > Done. r161666