Mail Archives: djgpp/1998/03/19/21:30:31
Is it safe to write code that has SS != DS? I was hoping to be able to
allocate a descriptor, set it's base address to somewhere in my DS
(malloc'd ptr), and then set it's limit to the size of my new stack, to
catch stack faults.
I need to do this (or something like it) for the LWP package, becuase it
currently can't catch stack faults.
This could be done by allocating more space than I need, and then doing an
mprotect at both ends of the space (to catch stack overflow/underflow),
but a wild pointer could jump completely past the protected regions. Is the
descriptor method a possible alternative?
Josh
44699 AT ef DOT gc DOT maricopa DOT edu
- Raw text -