aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.exceptions/assert_fail.d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2025-03-15 16:32:48 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2025-03-18 18:53:11 +0100
commitb3b54f9c9a74909a41ea566c2135c9e01121994c (patch)
treecfbbf84f1dd272b05414b62421bf4dc02e90eb60 /libphobos/testsuite/libphobos.exceptions/assert_fail.d
parentf2af60465cd129b8deb3283baaf8fbac1a5941d4 (diff)
downloadgcc-b3b54f9c9a74909a41ea566c2135c9e01121994c.zip
gcc-b3b54f9c9a74909a41ea566c2135c9e01121994c.tar.gz
gcc-b3b54f9c9a74909a41ea566c2135c9e01121994c.tar.bz2
libphobos: Merge changes in upstream druntime testsuite
libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime d2ee11364c. * testsuite/libphobos.aa/test_aa.d: Add new test. * testsuite/libphobos.betterc/test19933.d: Adjust imports. * testsuite/libphobos.config/test22523.d: Likewise. * testsuite/libphobos.exceptions/assert_fail.d: Adjust test. * testsuite/libphobos.exceptions/chain.d: Adjust imports. * testsuite/libphobos.exceptions/future_message.d: Likewise. * testsuite/libphobos.exceptions/line_trace.d: Likewise. * testsuite/libphobos.exceptions/long_backtrace_trunc.d: Likewise. * testsuite/libphobos.exceptions/static_dtor.d: Likewise. * testsuite/libphobos.gc/forkgc.d: Likewise. * testsuite/libphobos.gc/precisegc.d: Likewise. * testsuite/libphobos.gc/recoverfree.d: Likewise. * testsuite/libphobos.hash/test_hash.d: Likewise. * testsuite/libphobos.init_fini/custom_gc.d: Likewise. * testsuite/libphobos.init_fini/thread_join.d: Likewise. * testsuite/libphobos.thread/external_threads.d: Likewise. * testsuite/libphobos.thread/fiber_guard_page.d: Likewise. * testsuite/libphobos.thread/tlsgc_sections.d: Likewise. * testsuite/libphobos.thread/tlsstack.d: Likewise. * testsuite/libphobos.unittest/customhandler.d: Likewise.
Diffstat (limited to 'libphobos/testsuite/libphobos.exceptions/assert_fail.d')
-rw-r--r--libphobos/testsuite/libphobos.exceptions/assert_fail.d8
1 files changed, 8 insertions, 0 deletions
diff --git a/libphobos/testsuite/libphobos.exceptions/assert_fail.d b/libphobos/testsuite/libphobos.exceptions/assert_fail.d
index 352ccca3..ee5caf6 100644
--- a/libphobos/testsuite/libphobos.exceptions/assert_fail.d
+++ b/libphobos/testsuite/libphobos.exceptions/assert_fail.d
@@ -523,8 +523,16 @@ void testDestruction()
new long[100];
}
+ static void clobberStack()
+ {
+ ubyte[1024] clobber;
+ clobber[] = 0xff;
+ }
+
import core.memory : GC;
createGarbage();
+ // ensure there are no stale references on the stack
+ clobberStack();
GC.collect();
assert(Test.run);