MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / spawn_thread

Function spawn_thread

g2all/700/lapse.js:499–510  ·  view source on GitHub ↗
(thread)

Source from the content-addressed store, hash-verified

497}
498
499function spawn_thread(thread) {
500 const ctx = new Buffer(context_size);
501 const pthread = new Pointer();
502 pthread.ctx = ctx;
503 // pivot the pthread's stack pointer to our stack
504 ctx.write64(0x38, thread.stack_addr);
505 ctx.write64(0x80, thread.get_gadget("ret"));
506
507 call_nze("pthread_create", pthread.addr, 0, chain.get_gadget("setcontext"), ctx.addr);
508
509 return pthread;
510}
511
512// EXPLOIT STAGES IMPLEMENTATION
513

Callers 1

race_oneFunction · 0.70

Calls 3

call_nzeFunction · 0.70
write64Method · 0.45
get_gadgetMethod · 0.45

Tested by

no test coverage detected