Commit 86ee2038 by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/63888 (bootstrap failed when configured with…

re PR bootstrap/63888 (bootstrap failed when configured with -with-build-config=bootstrap-asan --disable-werror)

	PR bootstrap/63888
	* asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation
	support until it is rewritten upstream.

	* c-c++-common/asan/pr63888.c: New test.

From-SVN: r220919
parent 2c6a427f
2015-02-20 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/63888
* c-c++-common/asan/pr63888.c: New test.
2015-02-23 Oleg Endo <olegendo@gcc.gnu.org> 2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
PR target/65163 PR target/65163
......
/* PR bootstrap/63888 */
/* { dg-do run } */
__attribute__((noinline, noclone)) int
foo (int x)
{
int v = 0;
switch (x)
{
case 11: v = 67; break;
case 12: v = 68; break;
case 13: v = 69; break;
}
return v;
}
__attribute__((noinline, noclone)) int
bar (int x)
{
int v = 0;
switch (x)
{
case 18: v = 67; break;
case 19: v = 68; break;
case 20: v = 69; break;
}
return v;
}
int
main ()
{
return foo (11) - 67 + bar (19) - 68;
}
2015-02-20 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/63888
* asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation
support until it is rewritten upstream.
2015-01-26 Matthias Klose <doko@ubuntu.com> 2015-01-26 Matthias Klose <doko@ubuntu.com>
* configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
......
...@@ -148,7 +148,9 @@ static void RegisterGlobal(const Global *g) { ...@@ -148,7 +148,9 @@ static void RegisterGlobal(const Global *g) {
CHECK(AddrIsInMem(g->beg)); CHECK(AddrIsInMem(g->beg));
CHECK(AddrIsAlignedByGranularity(g->beg)); CHECK(AddrIsAlignedByGranularity(g->beg));
CHECK(AddrIsAlignedByGranularity(g->size_with_redzone)); CHECK(AddrIsAlignedByGranularity(g->size_with_redzone));
if (flags()->detect_odr_violation) { // This "ODR violation" detection is fundamentally incompatible with
// how GCC registers globals. Disable as useless until rewritten upstream.
if (0 && flags()->detect_odr_violation) {
// Try detecting ODR (One Definition Rule) violation, i.e. the situation // Try detecting ODR (One Definition Rule) violation, i.e. the situation
// where two globals with the same name are defined in different modules. // where two globals with the same name are defined in different modules.
if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment