<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Gill Sans";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:GillSans-Light;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecxapple-style-span
        {mso-style-name:ecxapple-style-span;}
span.ecxapple-converted-space
        {mso-style-name:ecxapple-converted-space;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jay:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ok, I don’t mean to start a new issue or upset anyone.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I see you checked in some new changes.  I updated to latest HEAD and tried to build, but again I get unresolved symbols beginning with m3-libs\sysutils  (see attached sysutils.lst)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So, not sure what you mean by “it should be ok now”.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Are you saying you do, or do not, want me to work further on the solving the “problem,” regardless of how we describe it ?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Randy<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> jayk123@hotmail.com [mailto:jayk123@hotmail.com] <b>On Behalf Of </b>Jay K<br><b>Sent:</b> Friday, February 11, 2011 4:52 PM<br><b>To:</b> Tony; Coleburn, Randy<br><b>Cc:</b> m3devel<br><b>Subject:</b> RE: [M3devel] threading on Windows?<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>It isn't heap-based!<br>  And saying it "leaks" is misleading. It doesn't leak how most people would consider "leak".<br>  It calls _alloca. If you call _alloca in a loop, you get more and more storage, until you return from the function.<br>  I understand this. Tony understand it. But calling it "leak" will mislead almost everyone else.<br>It should be ok now. But still only a temporary solution. We have to either move all the back<br>to the old way, or make the new way work.<br><br><br>As we have two implementations of many things, it is common for one or the other to break.<br>The fix is really not difficult. We can't be stuck like this on everything.<br>But granted, m3front remains confusing to me, so I am stuck for a bit<br>doing this much better.<br><br>Anyway, my time is now significantly reallocated, so it all matters less.<br><br> - Jay<o:p></o:p></span></p><div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><hr size=2 width="100%" align=center id=stopSpelling></span></div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From: hosking@cs.purdue.edu<br>Date: Fri, 11 Feb 2011 16:29:43 -0500<br>To: rcolebur@SCIRES.COM<br>CC: m3devel@elegosoft.com<br>Subject: Re: [M3devel] threading on Windows?<br><br>Randy,<o:p></o:p></span></p><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>I am in complete agreement with you.<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p><div><div><div><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Antony Hosking</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'>|</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'>Associate Professor | Computer Science | Purdue University</span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'>305 N. University Street | West Lafayette | IN 47907 | USA</span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Office</span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> +1 765 494 6001 |</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Mobile</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'>+1 765 427 5484</span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><br><br><o:p></o:p></span></p></div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p></div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p><div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>On Feb 11, 2011, at 4:26 PM, Coleburn, Randy wrote:<o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p><div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Tony:</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you very much for this explanation.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So, it appears that the changes introduced to support the new “heap-based jmpbuf allocation” have introduced at least 2 problems that must be solved if we are to move forward on the Windows platform, namely:</span><o:p></o:p></p></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>1.</span><span style='font-size:7.0pt;color:#1F497D'>      <span class=ecxapple-converted-space> </span></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Space leak problem.</span><o:p></o:p></p></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2.</span><span style='font-size:7.0pt;color:#1F497D'>      <span class=ecxapple-converted-space> </span></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Binding to appropriate “alloca” routine on Windows platform.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Assuming we want to retain this new heap-based jmpbuf allocation capability, someone needs to solve these 2 problems for the Windows platform.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I will begin looking at the code and see if I can make some progress on these 2 problems.  Before I “do” anything, I’ll run my proposed solution thru the m3devel group first.  Any further insights you or Jay can give in helping me work on the solution are welcome and appreciated.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Finally, let me also suggest that we all may need to revisit the conversation we had on this forum many months back about contributors making sure their changes are tested not to cause major breaks before committing them to HEAD branch. </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Seems to me that if the “heap based jumpbuf allocation scheme” was known not to be compatible with Windows, that it should have been checked in on a different experimental branch until all the kinks could be worked out for all platforms.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Otherwise, without some mechanism to warn everyone of known problems on the HEAD branch, folks can easily download stuff that renders their implementation broken.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If my understanding of HEAD is not the prevailing one, I for one would like clarification as to what is STABLE for checkout and use and what is UNSTABLE.</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Randy Coleburn</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=ecxapple-converted-space><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Tony Hosking [mailto:hosking@cs.purdue.edu]<span class=ecxapple-converted-space> </span><br><b>Sent:</b><span class=ecxapple-converted-space> </span>Thursday, February 10, 2011 4:26 PM<br><b>To:</b><span class=ecxapple-converted-space> </span>Coleburn, Randy<br><b>Cc:</b><span class=ecxapple-converted-space> </span>m3devel<br><b>Subject:</b><span class=ecxapple-converted-space> </span>Re: [M3devel] threading on Windows?</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>Hi Randy,<o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>A far as I know, the changes are as follows.<o:p></o:p></p></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>TRY blocks using setjmp/longjmp to implement the exception handling each require statically one instance of a jmpbuf.  Historically, the storage for this was reserved as stack local storage (using CG.Declare_param) of the target-dependent jmpbuf size.  This meant having to declare the jmp_buf accurately for the target.  What Jay did was to replace the stack local with a scalar pointer local variable (also using Declare_param), and to call alloca to obtain a pointer to stack allocated jmpbuf storage.  The idea was to add a level of indirection, and have the size of the jmpbuf obtained from a C variable initialized appropriately,  so that targets need no longer declare their jmpbuf_size.   This was intended to make porting easier.  There are several problems here.  First, the local pointer variable needs to be initialized *once* on entry to the procedure to the value NIL, so that we check for NIL on the first invocation of the TRY and alloca only in that case.  The problem is that currently that initialization is not being performed *once* but instead on each invocation of the TRY so loops with TRY blocks in them currently have a space leak.<o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>The other problem was how to bind to the appropriate alloca routine.  Ideally it should be inlined, and on Windows this is achieved by calling a *different* function, not called alloca.  My suggestion is that making the alloca call a runtime hook will allow targets to easily redirect to the correct function.  On non-Windows targets using the gcc-based backend all works out because alloca is a gcc intrinsic function that gets inlined.<o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>To fix the space leak problem I proposed that Marker in the M3 compiler front end m3front should track, per-procedure, the jmpbuf pointer variables as it parses or checks the program, and have a callback to initialize them at the top of the procedure during code generation.  I don't think this will involve much work, but I don't currently have any spare cycles to spend on it.<o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:1.0in'>-- Tony<o:p></o:p></p><div><div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Antony Hosking</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'>|</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:black'>Associate Professor | Computer Science | Purdue University</span></span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'>305 N. University Street | West Lafayette | IN 47907 | USA</span></span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Office</span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> +1 765 494 6001 |</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"Gill Sans","serif";color:blue'>Mobile</span></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'> </span></span><span class=ecxapple-style-span><span style='font-size:9.0pt;font-family:"GillSans-Light","serif";color:black'>+1 765 427 5484</span></span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'> </span><o:p></o:p></p></div></div><div style='margin-left:.5in'><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><o:p> </o:p></p></div></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div><div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>On Feb 10, 2011, at 3:59 PM, Coleburn, Randy wrote:<o:p></o:p></p></div></div><div style='margin-left:.5in'><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><o:p> </o:p></p></div><div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jay / Tony:</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am seeing in this thread that the approach to fixing the problem is not yet agreed upon.</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I will be glad to help in any way I can, but right now, I am “in the dark”, both as to what change was introduced that caused the problem, and the various potential solution paths.  All I know is that it has been broken for a number of weeks now.</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I know Jay has asked for help, and I am willing to help, but it may cost him or you some time/effort in getting me up to speed on what went wrong and the pros/cons of potential solutions.  If you choose to help enlighten me, I pledge to try and put that knowledge to good use both now and in the future.  Otherwise, I will have to wait for one of you to solve the problem.</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>BTW, when I look at the linker error reports for the various packages, I’m seeing several different symbols that don’t resolve, not just the one dealing with memory allocation.</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Randy</span><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div style='border:none;border-top:solid windowtext 3.0pt;padding:3.0pt 0in 0in 0in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=ecxapple-converted-space><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Tony Hosking [mailto:hosking@cs.purdue.edu]<span class=ecxapple-converted-space> </span><br><b>Sent:</b><span class=ecxapple-converted-space> </span>Thursday, February 10, 2011 3:33 PM<br><b>To:</b><span class=ecxapple-converted-space> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br><b>Cc:</b><span class=ecxapple-converted-space> </span>Coleburn, Randy; m3devel<br><b>Subject:</b><span class=ecxapple-converted-space> </span>Re: [M3devel] threading on Windows?</span><o:p></o:p></p></div></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:1.5in'>Why is it better?  Because rebinding to a different function is just a matter of changing an INTERFACE in the libraries, rather than hacking the compiler.<o:p></o:p></p><div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>On Feb 10, 2011, at 6:01 AM,<span class=ecxapple-converted-space> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><span class=ecxapple-converted-space> </span>wrote:<o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><br><br><o:p></o:p></p></div></div><div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>1. I never understood why this any better.<br>2. It how things are currently.<o:p></o:p></p></div></div></div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>3. Why not m3cg.alloca? (but see #2)<o:p></o:p></p></div></div></div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><br> - Jay/iPad<o:p></o:p></p></div></div></div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:1.5in'><br>On Feb 9, 2011, at 9:48 PM, Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>What happened to fixing this with runtime hooks?<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:1.5in'> <o:p></o:p></p><div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'>On Feb 9, 2011, at 11:40 PM, Jay K wrote:<o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><br><br><o:p></o:p></p></div></div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Of course not.<br>It is a made-up function that the frontend generates a call to.<br>That it never previously did.<br>Using the general function call interface.<br>You need to add a special case, in the general function call code, to do something different and specific<br>for this specific function.<br> <br> <br> - Jay <br> </span><o:p></o:p></p></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><hr size=2 width="100%" align=center></span></div></div></div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:1.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:<span class=ecxapple-converted-space> </span><a href="mailto:rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>To:<span class=ecxapple-converted-space> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>;<span class=ecxapple-converted-space> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Date: Wed, 9 Feb 2011 22:28:45 -050<br>Subject: Re: [M3devel] threading on Windows?</span><o:p></o:p></p><div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jay:</span><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-left:1.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I looked thru the 4,618 lines of M3x86.m3, but I don’t see any reference to “m3_alloca” or even “alloc” in this file.</span><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-left:1.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div></div></div><div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Randy</span><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-left:1.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid windowtext 3.0pt;padding:3.0pt 0in 0in 0in'><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=ecxapple-converted-space><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><a href="mailto:jayk123@hotmail.com">jayk123@hotmail.com</a><span class=ecxapple-converted-space> </span>[mailto:jayk123@hotmail.com]<span class=ecxapple-converted-space> </span><b>On Behalf Of<span class=ecxapple-converted-space> </span></b>Jay K<br><b>Sent:</b><span class=ecxapple-converted-space> </span>Wednesday, February 09, 2011 9:01 PM<br><b>To:</b><span class=ecxapple-converted-space> </span>Coleburn, Randy; m3devel<br><b>Subject:</b><span class=ecxapple-converted-space> </span>RE: [M3devel] threading on Windows?</span><o:p></o:p></p></div></div></div></div></div><p class=MsoNormal style='margin-left:2.0in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><o:p></o:p></p><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>In m3back/src/M3x86.m3.<br> <br> - Jay<br><br> </span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><hr size=2 width="100%" align=center></span></div></div></div></div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:2.0in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:<span class=ecxapple-converted-space> </span><a href="mailto:rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>To:<span class=ecxapple-converted-space> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Date: Wed, 9 Feb 2011 18:22:56 -0500<br>Subject: Re: [M3devel] threading on Windows?</span><o:p></o:p></p><div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am certainly willing to work on the problem, but need more context info about what caused it in order to know how to resolve.</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>All I know is that everything was working fine until I checked out the HEAD repository.</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>When you say “special case” calls “m3_alloca”, where do I go about finding this “special case”?</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Are we talking Modula-3 code, C code, Assembler, what?  What package/module?</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Randy</span><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-left:2.0in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid windowtext 3.0pt;padding:3.0pt 0in 0in 0in'><div style='margin-left:1.0in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=ecxapple-converted-space><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><a href="mailto:jayk123@hotmail.com">jayk123@hotmail.com</a><span class=ecxapple-converted-space> </span>[mailto:jayk123@hotmail.com]<span class=ecxapple-converted-space> </span><b>On Behalf Of<span class=ecxapple-converted-space> </span></b>Jay K<br><b>Sent:</b><span class=ecxapple-converted-space> </span>Wednesday, February 09, 2011 5:59 PM<br><b>To:</b><span class=ecxapple-converted-space> </span>Coleburn, Randy; Mika Nystrom; m3devel<br><b>Subject:</b><span class=ecxapple-converted-space> </span>RE: [M3devel] threading on Windows?</span><o:p></o:p></p></div></div></div></div></div><p class=MsoNormal style='margin-left:2.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><o:p></o:p></p><div style='margin-left:1.0in'><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Maybe someone else can do it?<br>The fix is: special case calls to the function "m3_alloca".<br>Change it to call "_chkstk" (or maybe "chkstk", whatever works).<br>The one parameter is an unsigned 32bit quantity, passed in eax, and the return value is a pointer, returned in esp.<br>To some extent I drag my feet hoping anyone else might become motivated enough to do it and start learning how.<br> <br> - Jay<br> <br>> From:<span class=ecxapple-converted-space> </span><a href="mailto:rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>> To:<span class=ecxapple-converted-space> </span><a href="mailto:mika@async.caltech.edu">mika@async.caltech.edu</a>;<span class=ecxapple-converted-space> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Date: Wed, 9 Feb 2011 17:25:20 -0500<br>> Subject: Re: [M3devel] threading on Windows?<br>><span class=ecxapple-converted-space> </span><br>> Mika:<br>><span class=ecxapple-converted-space> </span><br>> Sorry, but my Windows build is broken. Jay seems to indicate he is working on a "fix" and that this fix is relatively simple, but so far no solution has been checked in.<br>><span class=ecxapple-converted-space> </span><br>> I've been wanting to run your program ever since you first checked it in, but that was about same time the HEAD branch update introduced a build problem. Problem is an unresolved symbol during link.<br>><span class=ecxapple-converted-space> </span><br>> As soon as I can get the build problem resolved, I'll try out your test program.<br>><span class=ecxapple-converted-space> </span><br>> Regards,<br>> Randy Coleburn<br>><span class=ecxapple-converted-space> </span><br>> -----Original Message-----<br>> From: Mika Nystrom [mailto:mika@async.caltech.edu]<span class=ecxapple-converted-space> </span><br>> Sent: Wednesday, February 09, 2011 5:01 PM<br>> To:<span class=ecxapple-converted-space> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: [M3devel] threading on Windows?<br>><span class=ecxapple-converted-space> </span><br>> Hi m3devel,<br>><span class=ecxapple-converted-space> </span><br>> I'm just curious if anyone out there who's running CM3 on Windows has had<br>> a chance to try my thread testing program yet. Current status on Unix<br>> (Linux, FreeBSD) appears to be that there are problems in pthreads (but<br>> I think only under heavy load) and that user threading works perfectly.<br>> So I now wonder how things are on the third threading platform (Windows).<br>> The thread testing program is at m3-libs/m3core/tests/thread .<br>><span class=ecxapple-converted-space> </span><br>> (Note however that there is a memory leak in TRY-EXCEPT in the current<br>> head so don't try to update everything to the CVS head. The previous<br>> release should be OK.)<br>><span class=ecxapple-converted-space> </span><br>> Also has anyone else noticed that debugging information has recently<br>> broken? m3gdb is very unhappy on all platforms for me...<br>><span class=ecxapple-converted-space> </span><br>> Mika</span><o:p></o:p></p></div></div></div></div></div></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div></div></div></blockquote></div></div><div style='margin-left:.5in'><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div></div></div><div style='margin-left:.5in'><p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p></div></div></div></blockquote></div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p></div></div></body></html>