Is there anyway I can make my stacks red zone protected?
Allocate your stack segments using mmap. Use mprotect to make the page after the bottom of your stack read-only (I’m assuming the stack grows down on whatever system you’re using), or leave a hole in your address space. If you get a segfault due to an attempted write at the top of a red zone, map in some more stack and build a new red zone. =================================TOP============= Q162: Cache Architectures, Word Tearing, and VOLATILE Tim Beckmann wrote: > Dave Butenhof wrote: > > > David, > > > > > > My thoughts exactly! > > > > > > Does anyone know of a mainstream architecture that does this sort of > > > thing? > > > > Oh, absolutely. SPARC, MIPS, and Alpha, for starters. I’ll bet most other RISC > > systems do it, too, because it substantially simplifies the memory subsystem > > logic. And, after all, the whole point of RISC is that simplicity means speed. > > MIPS I know 🙂 The latest MIPS processors R10K and R5K are byte addressable. > The whole point of RISC is simplicit