3 ms·
> What kinda usecases are there for handling SIGSEGV? If you're building a runtime that includes go like goroutines, you could handle SIGSEGV when you run out
by mtanski 9y ago
> What kinda usecases are there for handling SIGSEGV?
If you're building a runtime that includes go like goroutines, you could handle SIGSEGV when you run out of stack space and graceful kill the go routine.
You can use it for some kind of online migration of VMS.
You could build a moving garbage collector system for native code multi-threaded code where you don't need to stop the world... you can deal with race of not stoping / moving by making those pages in accessible and only stoping the thread / fixing up if happens to hit moved memory.
A runtime for a language that has multi-threading system that doesn't share VM mappings (which is possible using the clone sys call on linux) but can share other things.
All somewhat advanced uses. But uses never the less.