Re: regression on zOS between 5.4.8 to 5.5.0 on zOS

Roberto Ierusalimschy <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
> The same SW stack and automated test works for me on AIX (which is
> also Big Endian), Windows, Linux/x86_64, Linux/s390x, and
> Linux/ppc64le
> The previous stack, with 5.4.8 or even 5.2.2. worked OK on the above + zOS
> 
> My suspicion is that something about the structs, unions, and
> shifting/masking around the representation of the stack is not as
> portable as 5.4.8.
> But I didn't get very far trying various de-optimizations in lobject.h
> and lopcodes.h

That is possible. Does zOS has something unusual related to alignment,
words, sizes for basic objects, or other memory issues?

In particular, can you try the following?

-------------------------------------------------------------------------
--- a/lstate.c
+++ b/lstate.c
@@ -345,2 +345,3 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud, unsigned seed) {
                        (*f)(ud, NULL, LUA_TTHREAD, sizeof(global_State)));
+printf("%ld %ld\n", sizeof(StackValue), sizeof(TValue));
   if (g == NULL) return NULL;
-------------------------------------------------------------------------

StackValue is a union than contains a TValue, and there is a lot of
casts from one to the other. If we want to get the next element, we
must add 1 to a pointer to the first type, before the cast.

In most machines, these two objects have the same size, so a bug of
adding 1 after the cast won't be detected.

-- Roberto

-- 
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/20260202191907.GC10552%40arraial.inf.puc-rio.br.
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.