<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><A href="http://opengrok.netbsd.org/source/search?q=&defs=setjmp">http://opengrok.netbsd.org/source/search?q=&defs=setjmp</A><BR><A href="http://opengrok.netbsd.org/source/search?q=&defs=longjmp">http://opengrok.netbsd.org/source/search?q=&defs=longjmp</A><BR>
<BR>
oh -- hopefully the existing sizes are correct for this code, else an interface break, not that m3 seems to mind binary compatibility breaks and all or stick version numbers in places, though maybe there are runtime checks for binary compat, at least for higher levels.<BR>
<BR>
On Windows, setjmp/longjmp optionally interact "correctly" with exception handling -- running __finally blocks and C++ destructors.<BR>
I wonder if the same is true for gcc?<BR>
(At some I'd really like to switch NT386 to not use setjmp/longjmp or TlsGetValue/TlsSetValue for this stuff.. after 64bit integer support...)<BR>
<BR> - Jay<BR><BR>
<HR id=stopSpelling>
<BR>
> From: hosking@cs.purdue.edu<BR>> Date: Sat, 15 Dec 2007 21:40:19 -0500<BR>> To: jay.krell@cornell.edu<BR>> CC: m3devel@elegosoft.com; mika@camembert.async.caltech.edu<BR>> Subject: Re: [M3devel] Ubuntu problems<BR>> <BR>> It may be slightly trickier than that, since appropriately sized <BR>> jmpbuf/ucontext needs to be declared.<BR>> <BR>> On Dec 15, 2007, at 9:14 PM, Jay wrote:<BR>> <BR>> > Maybe time to grab a BSD setjmp/longjmp or getcontext/setcontext, <BR>> > rename by prepending with m3_, and be done with it??<BR>> > e.g.<BR>> > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/i386/sys/ <BR>> > getcontext.S?rev=1.2&content-type=text/x-cvsweb-markup<BR>> > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/powerpc/sys/ <BR>> > getcontext.S?rev=1.3&content-type=text/x-cvsweb-markup<BR>> ><BR>> > My goodness, none of FreeBSD, OpenBSD, NetBSD have web searchable <BR>> > CVS archives..<BR>> > better links later..<BR>> ><BR>> > Regarding upgrade.sh, well, on Windows upgrade.cmd works. :)<BR>> > They are all "just" wrappers around cd'ing and building, but <BR>> > perhaps not trivial.<BR>> ><BR>> > - Jay<BR>> ><BR>> ><BR>> > > Date: Sun, 16 Dec 2007 02:38:03 +0100<BR>> > > From: dabenavidesd@yahoo.es<BR>> > > To: mika@async.caltech.edu; m3devel@elegosoft.com<BR>> > > CC: mika@camembert.async.caltech.edu<BR>> > > Subject: Re: [M3devel] Ubuntu problems<BR>> > ><BR>> > > Hi Mika,<BR>> > > what are you seeing is the problem of libc<BR>> > > setjmp/longjmp issue that we maybe have to advise more<BR>> > > to cm3 users, and in general *m3 (dec-src,pm3,ezm3,and<BR>> > > cm3 too) users that () user level thread<BR>> > > implementation which is part of m3core is not working<BR>> > > at this moment, so until community can make a<BR>> > > functioning a new implementation, we will use only<BR>> > > PTHREAD implementation on most new Linux<BR>> > > distributions.<BR>> > > Of course this solves the problems you are noticing,<BR>> > > so my advise in order to this do not happen any more<BR>> > > is write a note on the Download Area and maybe also in<BR>> > > (like a note in the Known issues), www.modula3.org<BR>> > > (If you allow me, I can do it)<BR>> > ><BR>> > > The most common case I know a (not very recent) of<BR>> > > distribution that works with user level implementation<BR>> > > that I use is Ubuntu Dapper 6.06, the libray is 2.3.6<BR>> > > http://packages.ubuntu.com/dapper/libdevel/libc6-dev<BR>> > > The next version of Ubuntu breaks when the Juno<BR>> > > package is compiling (pkl-fonts program executes), the<BR>> > > library libc6 is<BR>> > > http://packages.ubuntu.com/edgy/libdevel/libc6-dev.<BR>> > ><BR>> > > So for 5.4 sources use use the next CM3 variable<BR>> > > export CM3="/usr/local/cm3/bin/cm3 -DPTHREAD"<BR>> > ><BR>> > > This enable the system level thread implementation in<BR>> > > a earlier version of it (of cvs), but in the first<BR>> > > step bootstrap compiler you will ran in same problems<BR>> > > (in Edgy I got breack when running pkl-fonts, but<BR>> > > after that break you can re-compile it all well with<BR>> > > no problems, after you have build the new m3core).<BR>> > > If you can update the sources with the most recent (in<BR>> > > a personal opinion, stable version) would be better,<BR>> > > but here I would like to know if the script upgrade.sh<BR>> > > can do that work, i have not use it.<BR>> > > For me the most easy way for me was use the<BR>> > > instruction given by Tony for the cvs version, from I<BR>> > > take his words and make a relatively simple<BR>> > > instructions.<BR>> > ><BR>> > > Thanks<BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > > --- Mika Nystrom <mika@async.caltech.edu> wrote:<BR>> > ><BR>> > > > Hello Modula-3 people,<BR>> > > ><BR>> > > > I am trying to build things with CM3 on a relatively<BR>> > > > recent Ubuntu<BR>> > > > system (don't ask me why...) and I am running into a<BR>> > > > segfault that<BR>> > > > I haven't seen mentioned before. I have a feeling<BR>> > > > it has something<BR>> > > > to do with stack formats, but I'm not sure what to<BR>> > > > do next.<BR>> > > ><BR>> > > > I downloaded the cm3-5.4.0 binaries and started with<BR>> > > > that. The<BR>> > > > compiler in the binary distribution runs, but it<BR>> > > > appears to produce<BR>> > > > garbage. I first tried bootstrapping but it crashes<BR>> > > > the moment it<BR>> > > > tries to execute something it has compiled itself.<BR>> > > > So then I tried<BR>> > > > hello, world, with the same results...<BR>> > > ><BR>> > > > Here's the system identification:<BR>> > > ><BR>> > > > mika@edwards:~/test/src$ uname -a<BR>> > > > Linux edwards 2.6.20-16-386 #2 Sun Sep 23 19:47:10<BR>> > > > UTC 2007 i686 GNU/Linux<BR>> > > ><BR>> > > > I made a "hello, world" program as follows:<BR>> > > ><BR>> > > > MODULE Main;<BR>> > > > IMPORT IO;<BR>> > > ><BR>> > > > BEGIN IO.Put("Hello, world!\n") END Main.<BR>> > > ><BR>> > > > Compiled with cm3 directly from the distributed<BR>> > > > cm3-5.4.0 for<BR>> > > > LINUXLIBC6 and I get a crash in CsetjmpASM.s (as far<BR>> > > > as I can tell).<BR>> > > > The last unclobbered stack I seem to be able to get<BR>> > > > in m3gdb is<BR>> > > > this:<BR>> > > ><BR>> > > > Breakpoint 5, 0xb75e5fb4 in _setjmp () at<BR>> > > > ../src/C/LINUXLIBC6/CsetjmpASM.s:31<BR>> > > > 31 in ../src/C/LINUXLIBC6/CsetjmpASM.s<BR>> > > > (m3gdb) where<BR>> > > > #0 0xb75e5fb4 in _setjmp () at<BR>> > > > ../src/C/LINUXLIBC6/CsetjmpASM.s:31<BR>> > > > #1 0xb75dbd51 in RTThread__Transfer<BR>> > > > (from=0xbfe28530, to=0xbfe28530) at<BR>> > > > ../src/runtime/LINUXLIBC6/RTThreadC.c:14<BR>> > > > #2 0xb75dbaed in FlushStackCache () at<BR>> > > > RTThread.m3:65<BR>> > > > #3 0xb75e27c9 in DetermineContext (oldSP=Invalid<BR>> > > > C/C++ type code 35 in symbol table.<BR>> > > > ) at ThreadPosix.m3:1101<BR>> > > > #4 0xb75e270d in InitTopContext (c=Invalid C/C++<BR>> > > > type code 30 in symbol table.<BR>> > > > ) at ThreadPosix.m3:1076<BR>> > > > #5 0xb75e4325 in Init () at ThreadPosix.m3:1498<BR>> > > > #6 0xb75c9592 in InitRuntime (p_argc=Invalid C/C++<BR>> > > > type code 39 in symbol table.<BR>> > > > ) at RTLinker.m3:59<BR>> > > > #7 0x08048861 in main (argc=1, argv=0xbfe28824,<BR>> > > > envp=0xbfe2882c) at _m3main.mc:3<BR>> > > > (m3gdb) cont<BR>> > > > Continuing.<BR>> > > ><BR>> > > > Program received signal SIGSEGV, Segmentation fault.<BR>> > > > 0xa8dbaede in ?? ()<BR>> > > ><BR>> > > > s.sp was lately 16_b75af6b9, if that means anything<BR>> > > > at all.<BR>> > > ><BR>> > > > Oh yes, one more thing: setting LD_POINTER_GUARD to<BR>> > > > 0 before running<BR>> > > > the program has no effect on the crash.<BR>> > > ><BR>> > > > Any suggestions for how one might make progress on<BR>> > > > this?<BR>> > > ><BR>> > > > Mika<BR>> > > ><BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > > ______________________________________________<BR>> > > ¿Chef por primera vez?<BR>> > > Sé un mejor Cocinillas.<BR>> > > http://es.answers.yahoo.com/info/welcome<BR>> ><BR>> ><BR>> > Don't get caught with egg on your face. Play Chicktionary! Check it <BR>> > out!<BR>> <BR><BR><br /><hr />Share life as it happens with the new Windows Live. <a href='http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007' target='_new'>Share now!</a></body>
</html>