[3/4] libsanitizer: Adjust the asan/sanity-check-pure-c-1.c test

Message ID ZVSkgWx1fGtpCl07@tucnak
State Unresolved
Headers
Series None |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jakub Jelinek Nov. 15, 2023, 10:59 a.m. UTC
  Hi!

The updated libasan doesn't print __interceptor_free (or __interceptor_malloc)
but free (or malloc), the following patch adjusts the testcase so that it
accepts it.

2023-11-15  Jakub Jelinek  <jakub@redhat.com>

	* c-c++-common/asan/sanity-check-pure-c-1.c: Adjust for interceptor_
	or wrap_ substrings possibly not being emitted in newer libasan.


	Jakub
  

Patch

--- gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c.jj	2020-01-14 20:02:46.646611886 +0100
+++ gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c	2023-11-15 10:51:50.921621770 +0100
@@ -10,7 +10,7 @@  int main() {
 }
 
 /* { dg-output "heap-use-after-free.*(\n|\r\n|\r)" } */
-/* { dg-output "    #0 \[^\n\r]*(in _*(interceptor_|wrap_)free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "    #0 \[^\n\r]*(in _*(interceptor_|wrap_)?free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
 /* { dg-output "    #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:8|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
-/* { dg-output "    #0 \[^\n\r]*(in _*(interceptor_|wrap_)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "    #0 \[^\n\r]*(in _*(interceptor_|wrap_)?malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
 /* { dg-output "    #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:7|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */