[Vm-dev] GCC optimization levels [was new Cog VMs available [please read]]

Eliot Miranda eliot.miranda at gmail.com
Tue Sep 27 15:41:35 UTC 2011


On Tue, Sep 27, 2011 at 12:05 AM, Stefan Marr <squeak at stefan-marr.de> wrote:

>
> Hi:
>
> On 27 Sep 2011, at 08:45, Nicolas Cellier wrote:
>
> > Again some nasty kind of undefined shifts on signed/unsigned ints?
> > Or a macro expansion leading to subtle subexpression ordering (++i/++i) ?
> > Or one of the many dark zones here:
> > http://www.vmunix.com/~gabor/c/draft.html#601
> >
> > Being able to enumerate such a long list without any omission is
> > already something!
> > What a beautiful language !
>
> Kind of similar to the problems previous mentioned in this thread, we got a
> optimization bug in the RoarVM codebase too.
>
> It is biting me with an infinite loop when I use a GCC >4.2 or Intel
> compiler and enable optimization >O1 on two specific files.
>
> Still, I think the bug is somewhere completely else.
>
> I tried to go through the files and disable optimization for particular
> functions, without useful result... It is jumping. Perhaps there are
> multiple places where we use unspecified code.
>
> Are there any tools that could be useful to find such things?
>

The only way I know to do this quickly is to get a reproducible case that
runs to failure from start-up without user intervention and run the two VMs
side-by-side on that case.  If the bug shows itself when tracing is turned
on then it can be relatively easy to find the point at which the two diverge
and backtrack from there.

I tried the Clang static analyzer, but without much success.
> It also gives a lot of warnings about potentially uninitialized variables
> in the primitives. It does not like the primitiveFail/successFlag checks at
> all.
>

:)


>
> Best regards
> Stefan
>
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax:   +32 2 629 3525
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110927/0f6fdbaa/attachment.htm


More information about the Vm-dev mailing list