[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
|
|
Subscribe / Log in / New account

Preventing stack guard-page hopping

Preventing stack guard-page hopping

Posted Jun 19, 2017 23:32 UTC (Mon) by excors (subscriber, #95769)
In reply to: Preventing stack guard-page hopping by zblaxell
Parent article: Preventing stack guard-page hopping

> I've occasionally wondered what would happen if stacks were not accessible to other threads in the same process

I think that would break reasonable code like:

std::atomic_int n;
run_in_worker_threads_and_wait_for_them_all(iters, [&n] { n++; });

which passes a pointer to n (on the current thread's stack) to a bunch of worker threads (that probably weren't created by this thread).


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds