From 01b460fedb5715051397ecacbfe9d330e32528f7 Mon Sep 17 00:00:00 2001 From: Daan Date: Mon, 20 Mar 2023 13:24:11 -0700 Subject: [PATCH] add std::string test for macos --- test/main-override.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/main-override.cpp b/test/main-override.cpp index db96efb1..902cfdd4 100644 --- a/test/main-override.cpp +++ b/test/main-override.cpp @@ -36,14 +36,16 @@ static void fail_aslr(); // issue #372 static void tsan_numa_test(); // issue #414 static void strdup_test(); // issue #445 static void heap_thread_free_huge(); +static void test_std_string(); // issue #697 static void test_stl_allocators(); int main() { - mi_stats_reset(); // ignore earlier allocations - - heap_thread_free_huge(); + // mi_stats_reset(); // ignore earlier allocations + + test_std_string(); + // heap_thread_free_huge(); /* heap_thread_free_large(); heap_no_delete(); @@ -56,7 +58,7 @@ int main() { test_mt_shutdown(); */ //fail_aslr(); - mi_stats_print(NULL); + // mi_stats_print(NULL); return 0; } @@ -196,6 +198,13 @@ static void heap_no_delete() { } +// Issue #697 +static void test_std_string() { + std::string path = "/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxx/Build/Intermediates.noindex/xxxxxxxxxxx/arm64/XX_lto.o/0.arm64.lto.o"; + std::string path1 = "/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxx/Build/Intermediates.noindex/xxxxxxxxxxx/arm64/XX_lto.o/1.arm64.lto.o"; + std::cout << path + "\n>>> " + path1 + "\n>>> " << std::endl; +} + // Issue #204 static volatile void* global_p;