diff options
author | Denis Khalikov <d.khalikov@partner.samsung.com> | 2018-03-19 09:08:53 +0300 |
---|---|---|
committer | Denis Khalikov <d.khalikov@partner.samsung.com> | 2018-03-19 11:27:50 +0300 |
commit | 9ff70bf70b4eeddc8cc162151e3f95c4d8f9c79e (patch) | |
tree | 005b3b363f1a4401336f415c465c5d924ef5b399 | |
parent | 4e6e73964ab812c0d342bd36fa3b09b290c8fb76 (diff) | |
download | linaro-gcc-9ff70bf70b4eeddc8cc162151e3f95c4d8f9c79e.tar.gz linaro-gcc-9ff70bf70b4eeddc8cc162151e3f95c4d8f9c79e.tar.bz2 linaro-gcc-9ff70bf70b4eeddc8cc162151e3f95c4d8f9c79e.zip |
[ASan] Revert commit related to TTC-5 (PR sanitizer/81697).
We might have a strange situation with ASan and TLS,
when TLS_index struct should be defined as
.word .LANCHOR0(tlsldm),
but patch for TTC-5 assumes that is no ANCHOR sections
with ASan at all. So, in this specific case we pass TLS_index
struct with wrong alignment to __tls_get_addr () function
which cause a SEGV.
Next commit fix sanitizer/81697 with patch from upstream.
Change-Id: I9ee35ade027d246870bf57387f40217226efb7cc
-rw-r--r-- | gcc/testsuite/g++.dg/asan/global-alignment.C | 17 | ||||
-rw-r--r-- | gcc/varasm.c | 3 |
2 files changed, 1 insertions, 19 deletions
diff --git a/gcc/testsuite/g++.dg/asan/global-alignment.C b/gcc/testsuite/g++.dg/asan/global-alignment.C deleted file mode 100644 index c011c703ea6..00000000000 --- a/gcc/testsuite/g++.dg/asan/global-alignment.C +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-options "-fmerge-all-constants" } */ -/* { dg-do compile } */ -/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ - -#include <string> -#include <map> - -const char kRecoveryInstallString[] = "NEW"; -const char kRecoveryUpdateString[] = "UPDATE"; -const char kRecoveryUninstallationString[] = "UNINSTALL"; - -const std::map<std::string, int> kStringToRequestMap = { - {kRecoveryInstallString, 0}, - {kRecoveryUpdateString, 0}, - {kRecoveryUninstallationString, 0}, -}; -/* { dg-final { scan-assembler-times {\.section\s+\.rodata\n(?:(?!\.section).)*\.(string|ascii|asciz)\s+"NEW} 1 } } */ diff --git a/gcc/varasm.c b/gcc/varasm.c index 32206755b14..da88f5b6f72 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -344,8 +344,7 @@ get_section (const char *name, unsigned int flags, tree decl) static bool use_object_blocks_p (void) { - return (flag_section_anchors - && !(flag_sanitize & SANITIZE_ADDRESS)); + return flag_section_anchors; } /* Return the object_block structure for section SECT. Create a new |