<br><br><div class="gmail_quote">On Mon, Jan 10, 2011 at 11:31 PM, Andres Valloud <span dir="ltr"><<a href="mailto:avalloud@smalltalk.comcastbiz.net">avalloud@smalltalk.comcastbiz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Indeed, quite right. I happened to add a flag to turn off the heartbeat<br>
so I could debug the crash Matthew was seeing in starting up<br>
Squeak4.2-10856-beta.image (since single-stepping through machine code<br>
always gets interrupted by the heartbeat, it being an interval timer)<br>
and lo and behold the bug went away. This is very worrying because it<br>
appears to imply that there's a serious bug in the linux kernel/gcc<br>
since delivering a software interrupt shouldn't corrupt registers, but<br>
it clearly does. I'll try and pass it by someone who's an expert in<br>
this area.<br>
</blockquote>
<br></div>
Or the signal handler functions do not comply with the relevant specifications, e.g.: signal handlers that do not preserve the value of errno, signal handlers that use a function not in the list of approved safe functions you can call from a signal handler as per the Single Unix Specification, etc...<br>
</blockquote><div><br></div><div>Good point. The signal handler essentially calls gettimeofday (not on the approved list but time is) and sets a couple of variables (current 64-bit microsecond time, stackLimit). But it does not preserve errno. I don't want to avoid calling gettimeofday and can see no harm in it; it's equivalent internally to time providing it doesn't use its TIMEZONE arg (which it doesn't). But the signal handler /doesn't/ preserve errno and doing so is a very good idea and easy to do. Thanks.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
<br>
Andres.<br>
<br>
</font></blockquote></div><br>