nobo...@web.de wrote:
in the stackcheck example &_end is used for the stack check and the comment says that _end is defined by the linker.
Because the heap begins behind the bss segment and grows
towards the stack this seem to mean that stackcheck can only work
if the heap is unused.
Is this right?

yes


if you have a heap (use of malloc/free) then the stack check has to be done differently. one solution is to preclaculate a lowest allowed address and put the stackmarker there:

 extern unsigned short __stack;
 unsigned short *address = (unsigned short *)(__stack-50);

Reply via email to