This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-14 19:23:11 UTC ---
(In reply to comment #7)
> Created attachment 28445 [details]
> Prototype patch that introduces VALGRIND_MAKE_MEM_DEFINED
> 
> Attached prototype patch builds on HJ's patch. The patch detects valgrind in
> the same way as in gcc directory (actually, it just copies relevant bits) and
> changes:
> 
> +      memset (to.text + to.len + 1, 0, 16);
> 
> to
> 
> +      VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (to.text + to.len + 1, 16));
> 
> (BTW: Probably, we should align end of buffer to 16 byte boundary instead of
> hardcoding 16.)
> 

libcpp will read in advance beyond the end of buffer in
some cases, even without SSE optimization.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]