<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
The end of the stack isn't precise:<BR>
<BR>
C:\dev2\cm3.release_branch_cm3_5_8\m3-libs\m3core\src\thread\POSIX\ThreadPosix.m3(1058): self.stackbase := ADR(xx);<BR>
<BR>
"stack" here:<BR>
<BR>
void<BR>ProcessContext(Context *c, void *stack,<BR> void (*p) (void *start, void *stop))<BR>{<BR> if (stack < c->uc.uc_stack.ss_sp)<BR> p(stack, c->uc.uc_stack.ss_sp);<BR> else<BR> p(c->uc.uc_stack.ss_sp, stack);<BR>#ifdef __APPLE__<BR> p(&(c->uc.uc_mcontext[0]), &(c->uc.uc_mcontext[1]));<BR>#else<BR> p(&c[0], &c[1]);<BR>#endif<BR>}<BR><BR>
- Jay<BR><BR> <BR>> From: hosking@cs.purdue.edu<BR>> Date: Sun, 22 Nov 2009 13:41:26 -0500<BR>> To: jkrell@elego.de<BR>> CC: m3commit@elegosoft.com<BR>> Subject: Re: [M3commit] CVS Update: cm3<BR>> <BR>> > Note that ThreadPosix.m3 could also implement such precise stackbase.<BR>> <BR>> ThreadPosix *does* implement a precise stack base. It's obtained from the ucontext set in the thread switch routine (swapcontext).<BR>> <BR>> > ThreadPThread.m3 probably often could, like with the functions on OpenBSD (broken) and FreeBSD, etc.<BR>> <BR> </body>
</html>