Re: [Felix-language] [felix] Webserver crash

2010-10-19 Thread john skaller
On 20/10/2010, at 2:47 AM, john skaller wrote: > > On 20/10/2010, at 1:33 AM, john skaller wrote: > >> This program crashes: >> >> //--- >> noinline proc f() { >> var p = C_hack::cast[&(string * string)] (C_hack::xnew("Hello","World")); >> println$ *p; >> } >> >> f(); >> collect(); >> pri

Re: [Felix-language] [felix] Webserver crash

2010-10-19 Thread john skaller
On 20/10/2010, at 1:33 AM, john skaller wrote: > This program crashes: > > //--- > noinline proc f() { > var p = C_hack::cast[&(string * string)] (C_hack::xnew("Hello","World")); > println$ *p; > } > > f(); > collect(); > println$ "Done"; > //- well now, here is the problem: ~/fel

Re: [Felix-language] [felix] Webserver crash

2010-10-19 Thread john skaller
This program crashes: //--- noinline proc f() { var p = C_hack::cast[&(string * string)] (C_hack::xnew("Hello","World")); println$ *p; } f(); collect(); println$ "Done"; //- BTW: sometimes I find the lack of a "new" function very annoying. xnew returns a gcptr[] not an ordinary point

Re: [Felix-language] [felix] Webserver crash

2010-10-19 Thread john skaller
On 19/10/2010, at 1:29 PM, john skaller wrote: > > On 19/10/2010, at 1:14 PM, john skaller wrote: >> >> Well i have just run the webserver with FLX_DEBUG on and I got a crash >> whilst garbage collecting: >> >> >> Garbage 0x10010e8c0=address >> Garbage 0x10010e8d0=address >> Garbage 0x100

Re: [Felix-language] [felix] Webserver crash

2010-10-18 Thread john skaller
On 19/10/2010, at 1:14 PM, john skaller wrote: > > Well i have just run the webserver with FLX_DEBUG on and I got a crash > whilst garbage collecting: > > > Garbage 0x10010e8c0=address > Garbage 0x10010e8d0=address > Garbage 0x10010e900=_at19582 > Segmentation fault Well I know where it i

Re: [Felix-language] [felix] Webserver crash

2010-10-18 Thread john skaller
On 18/10/2010, at 10:10 PM, john skaller wrote: > > HOWEVER .. none of this explains why the webserver is CRASHING: > writing on a dead connection shouldn't cause a problem as long > as the actual socket is open. > > I just got another crash with a "call to pure virtual" diagnostic. I promise >

Re: [Felix-language] [felix] Webserver crash

2010-10-18 Thread john skaller
Interesting: I changed the write_felix procedure so that it calls a write_string wrapper that does a non-local goto to the end of the procedure on end of file: felix version of "exceptions" .. :) But it is called by another procedure which also writes, so I then changed the write_felix procedur

Re: [Felix-language] [felix] Webserver crash

2010-10-18 Thread john skaller
Ok, I have sorted out the broken pipe thing, basically in the webserver I am writing stuff out using this procedure: proc write_string[ostr with OByteStream[ostr]] (sk: ostr, var s: string) { var slen = len s; var a = C_hack::cast[address]$ cstr s; var eof: bool; write(sk, &sl

Re: [Felix-language] [felix] Webserver crash

2010-10-17 Thread john skaller
On 18/10/2010, at 4:37 AM, john skaller wrote: > > Hmmm error code 11 > Hmm I thought I disabled SIGPIPE .. but here is the first clue: Program received signal SIGPIPE, Broken pipe. 0x7fff835ba316 in __semwait_signal () (gdb) bt #0 0x7fff835ba316 in __semwait_signal () #1 0x7