new Cog VMs uploaded

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

new Cog VMs uploaded

Eliot Miranda-2
 
...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale plugin.

best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] new Cog VMs uploaded

Levente Uzonyi-2
 
On Tue, 26 Apr 2011, Eliot Miranda wrote:

> ...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix
> shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale
> plugin.

Great, thanks!


Levente

>
> best,
> Eliot
>
Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs uploaded

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
with a fix for the VMs in 2379 to http://www.mirandabanda.org/files/Cog/VM/VM.r2380/.  These pass Levente's shift/reset tests.  Apologies for the earlier slip.

On Tue, Apr 26, 2011 at 2:01 PM, Eliot Miranda <[hidden email]> wrote:
...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale plugin.

best,
Eliot

Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs uploaded

Levente Uzonyi-2
 
On Tue, 26 Apr 2011, Eliot Miranda wrote:

> with a fix for the VMs in 2379
to http://www.mirandabanda.org/files/Cog/VM/VM.r2380/.  These pass
Levente's shift/reset tests.  Apologies for the
earlier slip.

Thanks Eliot, it works as expected.

Levente
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] new Cog VMs uploaded

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
Philippe,

    can you please profile before and after?  This could very well be to do with the additional cost of shallowCopy for contexts, but it is inevitable that a correct implementation is going to be more expensive than the simple block-copy.  The new implementation can be optimized, but we need to profile first to be sure we're tilting at the relevant windmill.

AdvThanksance
Eliot

On Wed, Apr 27, 2011 at 9:40 AM, Philippe Marschall <[hidden email]> wrote:
On <a href="tel:26.04.2011%2023" value="+12604201123">26.04.2011 23:01, Eliot Miranda wrote:
> ...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix
> shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale
> plugin.

I'm seeing quite a drastic performance degradation in the last two Cog
releases for Seaside. r2361 and r2370 would yield about 4300 to 4400
"points" for /tests/functional/WAPerformanceFunctionalTest. r2378 and
r2380 are down to about 2600 to 2700. That's almost a third slower.

Cheers
Philippe



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] new Cog VMs uploaded

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
can you post a stack trace from gdb?  Also, what linux system and what image are you using?

TIA
Eliot

On Wed, Apr 27, 2011 at 8:18 AM, Philippe Marschall <[hidden email]> wrote:
On <a href="tel:26.04.2011%2023" value="+12604201123">26.04.2011 23:01, Eliot Miranda wrote:
> ...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix
> shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale
> plugin.

The following still crashes my vm:

(Locale localeID: (LocaleID isoLanguage: 'de' isoCountry: 'CH'))
primShortDateFormat

Cheers
Philippe



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] new Cog VMs uploaded

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
Hi All,

    this is because of carelessness in the trunk platforms/unix/plugins/LocalePlugin/sqUnixLocale.c which uses strcpy to copy C strings from the locale subsystem into Smalltalk strings.  strcpy copies the trailing null, which will overwrite the first byte of the following object.  This just happens not to kill the standard VM because current code always uses these functions on new strings.  But Cog currently checks for attempts to overwrite objects and hence it catches these attemptys and aborts, with an error message.

Hilaire, Phillipe, you should have seen and reported the "last object overwritten" report form the VM and if so we would have debugged this a lot sooner.  Error messages are there to be read. 

Ian, David, I recommend that you fold

    Revision: 2382

back into trunk.

I've replaced all uses of strcpy in platforms/unix/plugins/LocalePlugin/sqUnixLocale.c with the following:

/* For Cog do *not* copy the trailing null since the VM checks for attempts to
 * overwrite the end of an object, and copying the trailing null into a string
 * does precisely this.
 */
#define safestrcpy(str,source) do { \
    char *src = (source); \
    int len = strlen(src); \
    strncpy(str,src,len); \
} while (0)



On Wed, Apr 27, 2011 at 8:18 AM, Philippe Marschall <[hidden email]> wrote:
On <a href="tel:26.04.2011%2023" value="+12604201123">26.04.2011 23:01, Eliot Miranda wrote:
> ...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix
> shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale
> plugin.

The following still crashes my vm:

(Locale localeID: (LocaleID isoLanguage: 'de' isoCountry: 'CH'))
primShortDateFormat

Cheers
Philippe



Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs uploaded

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
and now http://www.mirandabanda.org/files/Cog/VM/VM.r2382/ has the fix for Locale on linux.

On Tue, Apr 26, 2011 at 6:37 PM, Eliot Miranda <[hidden email]> wrote:
with a fix for the VMs in 2379 to http://www.mirandabanda.org/files/Cog/VM/VM.r2380/.  These pass Levente's shift/reset tests.  Apologies for the earlier slip.


On Tue, Apr 26, 2011 at 2:01 PM, Eliot Miranda <[hidden email]> wrote:
...to http://www.mirandabanda.org/files/Cog/VM/VM.r2379/.  These fix shallowCopy and copyFrom: for contexts and (I hope) fix the linux Locale plugin.

best,
Eliot