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();
>> println$ "Done";
>> //-----
> 
> 
> 
> well now, here is the problem:
> 
> ~/felix>build/release-optimized/bin/flx --test=build/release-optimized/ 
> --force --nofelix tgc
> ('Hello', 'World')
> Finalising at 0x1001005a0 for 2 objects type _at9100 size 16
> Try to finalise string at 0x1001005a0=Hello
> Size of string is 8
> Size of void* is 8
> Try to finalise string at 0x1001005b0=(null)
> Size of string is 8
> Size of void* is 8
> 
> Felix is adding 16 to the pointer to get the next string.. that's the size of 
> the whole
> array, not the size of one element..  simple!


It's fixed. And I can't crash the webserver now!

--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to