[PATCH] Fix PR64078

Bernd Edlinger bernd.edlinger@hotmail.de
Mon Sep 7 02:53:00 GMT 2015


we observed sporadic failures of the following two test cases (see PR64078):
c-c++-common/ubsan/object-size-9.c and c-c++-common/ubsan/object-size-10.c

For object-size-9.c this happens in a reproducible way when -fpic option is used:
If that option is used, it is slightly less desirable to inline the functions, but if an explicit
"inline" is added, the function is still in-lined, even if -fpic is used.

But it may also happen randomly when the sanitizer tries to dump memory around an object,
that lies next to a non-accessible page, the sanitizer prints "<memory cannot be printed>"
in this case, which is not what the test case expects here.  As a work around I added
a large alignment attribute, to make sure, that the object cannot be at a page boundary.

Boot-strapped and regression-tested x86_64-linux-gnu.
OK for trunk?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: changelog-pr64078.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150907/9256ce7d/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-pr64078.diff
Type: application/octet-stream
Size: 1422 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150907/9256ce7d/attachment.obj>

More information about the Gcc-patches mailing list