Added stack specific flags for thread stack allocation
This commit is contained in:
parent
a0388ae15a
commit
819a4a907b
1 changed files with 1 additions and 2 deletions
|
@ -1,9 +1,8 @@
|
|||
import mem
|
||||
import sys
|
||||
|
||||
create(func Pointer) -> Int {
|
||||
size := 4096
|
||||
stack := mem.alloc(size)
|
||||
stack := sys.mmap(0, size, 0x1|0x2, 0x02|0x20|0x100|0x20000)
|
||||
rip := stack + size - 8
|
||||
store(rip, 8, func)
|
||||
return sys.clone(0x100|0x200|0x400|0x800|0x8000|0x10000|0x80000000, rip)
|
Loading…
Add table
Add a link
Reference in a new issue