mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 03:58:19 +00:00
Test case for issue #237 (OS X crash when creating 2048:th Uc object)
This commit is contained in:
parent
aaa53f7e6b
commit
a435307543
1 changed files with 20 additions and 0 deletions
20
tests/regress/osx_qemu_thread_create_crash.py
Executable file
20
tests/regress/osx_qemu_thread_create_crash.py
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import platform
|
||||||
|
import resource
|
||||||
|
|
||||||
|
from unicorn import *
|
||||||
|
|
||||||
|
import regress
|
||||||
|
|
||||||
|
# OS X: OK with 2047 iterations.
|
||||||
|
# OS X: Crashes at 2048:th iteration ("qemu: qemu_thread_create: Resource temporarily unavailable").
|
||||||
|
# Linux: No crashes observed.
|
||||||
|
class ThreadCreateCrash(regress.RegressTest):
|
||||||
|
def test(self):
|
||||||
|
for i in xrange(2048):
|
||||||
|
Uc(UC_ARCH_X86, UC_MODE_64)
|
||||||
|
self.assertTrue(True, "If not reached, then we have a crashing bug.")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
regress.main()
|
Loading…
Reference in a new issue