mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 22:20:37 +03:00
Trying to "fix" obvious non-deterministic test.
This commit is contained in:
parent
6b914aef11
commit
4f93c2a1a2
1 changed files with 8 additions and 0 deletions
|
@ -523,8 +523,16 @@ void testDestruction()
|
||||||
new long[100];
|
new long[100];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clobberStack()
|
||||||
|
{
|
||||||
|
ubyte[1024] clobber;
|
||||||
|
clobber[] = 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
import core.memory : GC;
|
import core.memory : GC;
|
||||||
createGarbage();
|
createGarbage();
|
||||||
|
// ensure there are no stale references on the stack
|
||||||
|
clobberStack();
|
||||||
GC.collect();
|
GC.collect();
|
||||||
|
|
||||||
assert(Test.run);
|
assert(Test.run);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue