Usage of -Os in 5.4 causing issues

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

Usage of -Os in 5.4 causing issues

Daniel Kolesa
I noticed that at least on my platform, using Lua 5.4 makes valgrind output practically unusable, with lots of messages like https://gist.github.com/q66/dacbbec6eefc3e7a17e4d95d7f4343f8 (with 5.3: https://gist.github.com/q66/71b1eda9f9d07cffb920459f9ae1db3c)

I went to investigate and turns out it's 5.4's new usage of -Os to compile llex.c/lparser.c/lcode.c; setting CMCFLAGS to empty results in the output being as clean as it's ever been. This is on powerpc64le/Linux/gcc 9.3.

Regards,

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Usage of -Os in 5.4 causing issues

Roberto Ierusalimschy
> I went to investigate and turns out it's 5.4's new usage of -Os to compile llex.c/lparser.c/lcode.c; setting CMCFLAGS to empty results in the output being as clean as it's ever been. This is on powerpc64le/Linux/gcc 9.3.

I am sorry, but can you explain what it means "setting CMCFLAGS to empty
results in the output being as clean as it's ever been"? (I could not
even parse it.)

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Usage of -Os in 5.4 causing issues

Daniel Kolesa
On Mon, Aug 3, 2020, at 16:15, Roberto Ierusalimschy wrote:
> > I went to investigate and turns out it's 5.4's new usage of -Os to compile llex.c/lparser.c/lcode.c; setting CMCFLAGS to empty results in the output being as clean as it's ever been. This is on powerpc64le/Linux/gcc 9.3.
>
> I am sorry, but can you explain what it means "setting CMCFLAGS to empty
> results in the output being as clean as it's ever been"? (I could not
> even parse it.)

Compiling everything with -O2 (i.e. setting CMCFLAGS to nothing) results in the valgrind output being clean, same as with 5.3 and below.

>
> -- Roberto
>
Reply | Threaded
Open this post in threaded view
|

Re: Usage of -Os in 5.4 causing issues

Ką Mykolas
Any issues relating compiler flags more.likely to be related to specific version or build of the compiler. There is not that much we can do to wipe out compiler bugs. Just reduce the testcase and report it.

On Mon, Aug 3, 2020, 16:20 Daniel Kolesa <[hidden email]> wrote:
On Mon, Aug 3, 2020, at 16:15, Roberto Ierusalimschy wrote:
> > I went to investigate and turns out it's 5.4's new usage of -Os to compile llex.c/lparser.c/lcode.c; setting CMCFLAGS to empty results in the output being as clean as it's ever been. This is on powerpc64le/Linux/gcc 9.3.
>
> I am sorry, but can you explain what it means "setting CMCFLAGS to empty
> results in the output being as clean as it's ever been"? (I could not
> even parse it.)

Compiling everything with -O2 (i.e. setting CMCFLAGS to nothing) results in the valgrind output being clean, same as with 5.3 and below.

>
> -- Roberto
>
Reply | Threaded
Open this post in threaded view
|

Re: Usage of -Os in 5.4 causing issues

Roberto Ierusalimschy
> Any issues relating compiler flags more.likely to be related to specific
> version or build of the compiler. There is not that much we can do to wipe
> out compiler bugs. Just reduce the testcase and report it.

I don't think this is a compiler bug, but a valgrind bug (or some other
configuration problem). Anyway, it is nothing related to Lua itself,
except for its use of '-s', a quite common and useful compiler flag.

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Usage of -Os in 5.4 causing issues

Ką Mykolas


On Mon, Aug 3, 2020, 18:09 Roberto Ierusalimschy <[hidden email]> wrote:
> Any issues relating compiler flags more.likely to be related to specific
> version or build of the compiler. There is not that much we can do to wipe
> out compiler bugs. Just reduce the testcase and report it.

I don't think this is a compiler bug, but a valgrind bug (or some other
configuration problem). Anyway, it is nothing related to Lua itself,
except for its use of '-s', a quite common and useful compiler flag.

-- Roberto

Mhm. I do remember some issues regarding compresses/uncompressed and various compression methods for the debug data. Lots of valgrind chains broke a few years ago...