SharedUnixLibrary and the System Heap
matt at stdevel.co.uk
Mon Mar 27 15:58:49 PST 2006
John Tytgat wrote:
>>Switching to a privledged mode within SUL in order to access the heap
>>seems like a sensible solution.
> I wasn't aware that there is code in the SUL module itself executed in
> user mode accessing the SVC stack (that's what you are saying, isn't it ?).
> You're sure it is SUL module code and not UnixLib in application space ?
The penultimate instruction of function |delink| is STR R0,[R1,#0] where
R1 points into the System Heap.
The problem here is that |delink| is called from the program's exit
handler, which executes in USR mode.
> I'm willing to investigate this more but I presume you have something I
> can use to protect the system heap from user mode access and see where
> things are breaking ?
Thank you, I'll see what I can sort out.
More information about the gcc