🗡️ stackaroo
Nice, long knife to stab yourself in the eye
stackaroo is a highly unsafe library, letting you swap out the OS-provided thread stack with your own custom stack (e.g. heap-backed).
What is this madness?
This library was created as part of research into Linux kernel internals. It provides platform-specific assembly implementations (x86_64 and AArch64) to perform direct stack pointer manipulation, allowing you to:
- Execute functions on arbitrarily large custom stacks (4GB? Why not!)
- Perform deep recursion that would normally cause stack overflow
- Test stack-intensive algorithms without OS stack limitations
- Experience the pure terror of manual memory management
Quick Example
use swap_to_heap;
Features
- Supports x86_64 and AArch64
no_stdcompatible- One swap per thread (
std) or one swap globally (no-std) - Does not support recursive stack swaps
Warning
This library is extremely unsafe and should only be used by people who understand the implications of manual stack management. It's primarily intended for research, kernel development, and testing scenarios where you need to bypass OS stack limitations.
License
This project is licensed under the Apache License 2.0.