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

Stefan Marr squeak at stefan-marr.de
Tue Sep 27 07:05:46 UTC 2011


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?

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 Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax:   +32 2 629 3525

More information about the Vm-dev mailing list