qemu-aarch64. Adjust halt_on_error tests.
gcc/testsuite/
* c-c++-common/asan/pr64820.c: Adjust output patterns.
* c-c++-common/asan/halt_on_error-1.c: Adjust.
* c-c++-common/asan/halt_on_error-1.c: Likewise.
Change-Id: Ic7be1b413b6761d4a89c4a6aa428b2255c7608e8
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
/* Test recovery mode. */
/* { dg-do run } */
/* { dg-options "-fsanitize-recover=address" } */
-/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=false" } */
#include <string.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+const char *
+__asan_default_options () {
+ return "halt_on_error=false";
+}
+
volatile int ten = 10;
int main() {
/* Test recovery mode. */
/* { dg-do run } */
/* { dg-options "-fsanitize-recover=address" } */
-/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=true" } */
/* { dg-shouldfail "asan" } */
#include <string.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+const char *
+__asan_default_options () {
+ return "halt_on_error=true";
+}
+
volatile int ten = 10;
int main() {
}
/* { dg-output "AddressSanitizer: stack-use-after-return on address 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
-/* { dg-output "WRITE of size 1 at .* thread T0.*" } */
+/* { dg-output "\[^\n\r]*WRITE of size 1 at .* thread T0.*" } */
/* { dg-output " #0.*(Func2)?.*pr64820.(c:28)?.*" } */
/* { dg-output "is located in stack of thread T0 at offset.*" } */
-/* { dg-output "\'local\' <== Memory access at offset 32 is inside this variable" } */
+/* { dg-output "\'local\'\[^\n\r]*<== Memory access at offset 32 is inside this variable" } */