Hi,

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?


Thanks,
Bernd.
                                          
2015-09-06  Bernd Edlinger  <bernd.edlin...@hotmail.de>

        PR testsuite/64078
        * c-c++-common/ubsan/object-size-9.c (s): Add alignment attribute.
        (f2, f3): Add inline attribute.
        * c-c++-common/ubsan/object-size-10.c (a, b): Add alignment attribute.

Attachment: patch-pr64078.diff
Description: Binary data

Reply via email to