Re: regression on zOS between 5.4.8 to 5.5.0 on zOS

gottfried leibniz <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
On 2/4/2026 7:10 AM, Eric Covener wrote:
> Big endian is the obvious one but it shares that with AIX which is unaffected.
> I have also seen warnings that "strict aliasing" is rather
> strict/aggressive on zOS / xlc.
> 

What z/OS compiler is being used here? In your debug output, one of the
OP_GETTABUP instructions [1] looks different when compiling the included
example on other machines (RA_Raw *should* be 4).

If you are building Lua from the release page, would it be possible to
generate and provide the compiler listing, e.g., ./luac -l -l -p $FILE
(It may also be helpful to include both 5.5 and 5.4.8).

> I also maintain this stack on AIX, another big endian platform, and
 > see no problem with 5.5.0.

While I presently do not have have access to a z/OS box (or one modern
enough with the requisite LLVM PTFs for Open XL C/C++), two related
issues I have hit in the past:

1. Older XL C/C++ 2.4.1 compilers (xlc/xlclang) will incorrectly
optimize the table.unpack loop[2] even with the strict options set
(i.e., -qstrict + -qstrict_induction), leading to a segfault around one
of the functions edge cases[3].

2. Older Nvidia C/C++ compilers (e.g., nvc 22.11-0) struggled with
overlapping assignments in lcode.c (even with [4] applied). For example,
compiling your case with this buggy compiler will output:

         5       [18]    SELF            0 0 255
         6       [18]    LOADK           2 5     ; "Hello Lua World: "
         7       [18]    GETTABUP        3 0 6   ; _ENV "type"

Which is also wrong and has an identical RA_Raw for OP_GETTABUP to your
case.

[1] 
https://gist.github.com/covener/4412c8be7762916335bb05e1d8171511#file-lua-txt-L36
[2] 
https://github.com/lua/lua/blob/2a7cf4f319fc276f4554a8f6364e6b1ba4eb2ded/ltablib.c#L214-L216
[3] 
https://github.com/lua/lua/blob/2a7cf4f319fc276f4554a8f6364e6b1ba4eb2ded/testes/sort.lua#L98
[4] 
https://github.com/lua/lua/commit/d51022bf9e496ae4a7276b600d2755becc7d4323

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/adc80935-cea7-4e5b-a1c1-1aab47e8ed18%40gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.