Message-Id: <9803200230.AA22825@gcef.gc.maricopa.edu> Date: Thu, 19 Mar 1998 19:30:09 -0700 (MST) From: "Joshua James Turpen" <44699 AT ef DOT gc DOT maricopa DOT edu> To: djgpp AT delorie DOT com Subject: Does GCC & libc assume SS == DS? Precedence: bulk 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