summaryrefslogtreecommitdiff
path: root/test/main-override.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/main-override.cpp')
-rw-r--r--test/main-override.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/main-override.cpp b/test/main-override.cpp
index 890b79a..c2210ec 100644
--- a/test/main-override.cpp
+++ b/test/main-override.cpp
@@ -32,15 +32,18 @@ void heap_late_free(); // issue #204
void padding_shrink(); // issue #209
void various_tests();
void test_mt_shutdown();
+void large_alloc(void); // issue #363
void fail_aslr(); // issue #372
int main() {
mi_stats_reset(); // ignore earlier allocations
+
heap_thread_free_large();
heap_no_delete();
heap_late_free();
padding_shrink();
various_tests();
+ large_alloc();
//test_mt_shutdown();
//fail_aslr();
mi_stats_print(NULL);
@@ -178,7 +181,7 @@ void heap_thread_free_large_worker() {
void heap_thread_free_large() {
for (int i = 0; i < 100; i++) {
- shared_p = mi_malloc_aligned(2*1024*1024 + 1, 8);
+ shared_p = mi_malloc_aligned(2 * 1024 * 1024 + 1, 8);
auto t1 = std::thread(heap_thread_free_large_worker);
t1.join();
}
@@ -210,6 +213,18 @@ void test_mt_shutdown()
std::cout << "done" << std::endl;
}
+// issue #363
+using namespace std;
+
+void large_alloc(void)
+{
+ char* a = new char[1ull << 25];
+ thread th([&] {
+ delete[] a;
+ });
+ th.join();
+}
+
// issue #372
void fail_aslr() {
size_t sz = (4ULL << 40); // 4TiB