aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-04-15 17:00:30 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-04-15 17:00:30 -0300
commit3dbb1a4b894c0744a331d4319d8d1704dc4ad943 (patch)
tree53ca693828759df1f56f7adabdeaa022a0db0fc7 /lstrlib.c
parent3dd8ea54daa77345a8f193e871f6792722d8e131 (diff)
downloadlua-3dbb1a4b894c0744a331d4319d8d1704dc4ad943.tar.gz
lua-3dbb1a4b894c0744a331d4319d8d1704dc4ad943.tar.bz2
lua-3dbb1a4b894c0744a331d4319d8d1704dc4ad943.zip
In gen. GC, some gray objects stay in gray listsHEADmaster
In generational collection, objects marked as touched1 stay in gray lists between collections. This commit fixes a bug introduced in commit 808976bb59.
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 321d6a0b..306cd0bf 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1544,8 +1544,10 @@ static KOption getdetails (Header *h, size_t totalsize, const char **fmt,
1544 else { 1544 else {
1545 if (align > h->maxalign) /* enforce maximum alignment */ 1545 if (align > h->maxalign) /* enforce maximum alignment */
1546 align = h->maxalign; 1546 align = h->maxalign;
1547 if (l_unlikely(!ispow2(align))) /* not a power of 2? */ 1547 if (l_unlikely(!ispow2(align))) { /* not a power of 2? */
1548 *ntoalign = 0; /* to avoid warnings */
1548 luaL_argerror(h->L, 1, "format asks for alignment not power of 2"); 1549 luaL_argerror(h->L, 1, "format asks for alignment not power of 2");
1550 }
1549 else { 1551 else {
1550 /* 'szmoda' = totalsize % align */ 1552 /* 'szmoda' = totalsize % align */
1551 unsigned szmoda = cast_uint(totalsize & (align - 1)); 1553 unsigned szmoda = cast_uint(totalsize & (align - 1));