[Vm-dev] [commit][3753] Do not use -O3 optimization, -O2 is safer and works well.
Jan Vrany
jan.vrany at fit.cvut.cz
Wed Dec 21 10:11:39 UTC 2016
On Tue, 2016-12-20 at 21:54 -0500, David T. Lewis wrote:
>
> On Wed, Dec 21, 2016 at 10:40:32AM +0800, Ben Coman wrote:
> >
> > On Wed, Dec 21, 2016 at 9:03 AM, <commits at squeakvm.org> wrote:
> > >
> > > Revision: 3753
> > > Author: lewis
> > > Date: 2016-12-20 17:03:04 -0800 (Tue, 20 Dec 2016)
> > > Log Message:
> > > -----------
> > > Do not use -O3 optimization, -O2 is safer and works well.
> > >
> > > gcc 4.9.2 gives crashes and heisenbugs with OSPP compiled with
> > > -O3.
> > >
> > > Symptoms:
> > > (1 to: 10) collect: [ :e | (CommandShell new pipeline: 'ps >
> > > /dev/null | cat') output]
> > > ==> segfaults in some of the spawned child processes
> > >
> > > This appears to be an actual compiler bug, although it goes away
> > > when print
> > > statements are added, so I cannot say for sure (and it is
> > > difficult to attach
> > > gdb to the newly spawned child process before it crashes). The
> > > bad behavior
> > > happens only with -O3 and there are no real performance benefits
> > > compared
> > > to -O2 (bytecodes faster, sends slower).
> >
> > I'd be interested to know the reason sends get slower (if known).
> > cheers -ben
>
> No clue, I was just sanity checking to make sure that -O2 was not
> horribly
> worse. It was not. But I suspect all of this is likely to vary
> depending on
> gcc compiler version and phase of the moon.
This post:
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.htm
l
explains the dependency on moon phases (and compiler versions) :-)
Jan
>
> Dave
>
>
>
More information about the Vm-dev
mailing list