<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/lua-github.git/lfunc.c, branch v5.4-beta</title>
<subtitle>github.com: lua/lua.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/'/>
<entry>
<title>Supressed errors in '__close' generate warnings</title>
<updated>2019-08-16T12:51:54+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-08-16T12:51:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=ca13be9af784b7288d3a07d9b5bccb329086e885'/>
<id>ca13be9af784b7288d3a07d9b5bccb329086e885</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>To-be-closed variables must be closed on initialization</title>
<updated>2019-07-31T13:43:51+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-31T13:43:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=f645d3157372c73573dff221c5b26691cb0e7d56'/>
<id>f645d3157372c73573dff221c5b26691cb0e7d56</id>
<content type='text'>
When initializing a to-be-closed variable, check whether it has a
'__close' metamethod (or is a false value) and raise an error if
if it hasn't. This produces more accurate error messages. (The
check before closing still need to be done: in the C API, the value
is not constant; and the object may lose its '__close' metamethod
during the block.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When initializing a to-be-closed variable, check whether it has a
'__close' metamethod (or is a false value) and raise an error if
if it hasn't. This produces more accurate error messages. (The
check before closing still need to be done: in the C API, the value
is not constant; and the object may lose its '__close' metamethod
during the block.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not collect open upvalues</title>
<updated>2019-07-22T12:41:10+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-22T12:41:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=9e6807c3c9d5036e999f636f936df07b72284442'/>
<id>9e6807c3c9d5036e999f636f936df07b72284442</id>
<content type='text'>
Open upvalues are kept alive together with their corresponding
stack. This change makes a simpler and safer fix to the issue in
commit 440a5ee78c8, about upvalues in the list of open upvalues
being collected while others are being created. (That previous fix
may not be correct.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Open upvalues are kept alive together with their corresponding
stack. This change makes a simpler and safer fix to the issue in
commit 440a5ee78c8, about upvalues in the list of open upvalues
being collected while others are being created. (That previous fix
may not be correct.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed bug for emergency collection in upvalue creation</title>
<updated>2019-07-19T15:13:00+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-19T15:13:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=440a5ee78c8592230780310c9c8d8c2ba1700cb1'/>
<id>440a5ee78c8592230780310c9c8d8c2ba1700cb1</id>
<content type='text'>
When creating an upvalue, an emergency collection can collect the
previous upvalue where the new one would be linked. The following
code can trigger the bug, using valgrind on Lua compiled with the
-DHARDMEMTESTS option:

  local x; local y
  (function () return y end)();
  (function () return x end)()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating an upvalue, an emergency collection can collect the
previous upvalue where the new one would be linked. The following
code can trigger the bug, using valgrind on Lua compiled with the
-DHARDMEMTESTS option:

  local x; local y
  (function () return y end)();
  (function () return x end)()
</pre>
</div>
</content>
</entry>
<entry>
<title>Tag LUA_TUPVALTBC replaced by a flag</title>
<updated>2019-07-19T14:12:31+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-19T14:12:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3'/>
<id>dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3</id>
<content type='text'>
It is simpler to signal a to-be-closed upvalue with a boolean flag,
instead of using a different tag.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is simpler to signal a to-be-closed upvalue with a boolean flag,
instead of using a different tag.
</pre>
</div>
</content>
</entry>
<entry>
<title>Small bug with stack reallocation</title>
<updated>2019-07-18T14:26:03+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-18T14:26:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=024a6071cac749504e0b26a915bda4f52c41a892'/>
<id>024a6071cac749504e0b26a915bda4f52c41a892</id>
<content type='text'>
OP_RETURN must update trap before updating stack. (Bug detected with
-DHARDSTACKTESTS). Also, in 'luaF_close', do not create a variable
with 'uplevel(uv)', as the stack may change and invalidate this
value. (This is not a bug, but could become one if 'upl' was used
again.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OP_RETURN must update trap before updating stack. (Bug detected with
-DHARDSTACKTESTS). Also, in 'luaF_close', do not create a variable
with 'uplevel(uv)', as the stack may change and invalidate this
value. (This is not a bug, but could become one if 'upl' was used
again.)
</pre>
</div>
</content>
</entry>
<entry>
<title>'__close' method may be called again in case of error</title>
<updated>2019-07-16T18:17:47+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-16T18:17:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=c220b0a5d099372e58e517b9f13eaa7bb0bec45c'/>
<id>c220b0a5d099372e58e517b9f13eaa7bb0bec45c</id>
<content type='text'>
An error in a closing method may be caused by a lack of resources,
such as memory or stack space, and the error may free enough resources
(by unwinding the stack) to allow the method to work if called again.

If the closing method is already running after some error (including
its own), it is not called again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An error in a closing method may be caused by a lack of resources,
such as memory or stack space, and the error may free enough resources
(by unwinding the stack) to allow the method to work if called again.

If the closing method is already running after some error (including
its own), it is not called again.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid setting the stack top below upvalues to be closed</title>
<updated>2019-07-16T17:13:22+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-16T17:13:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=298f383ffcc30d0799fbca0293175f647fe6bccf'/>
<id>298f383ffcc30d0799fbca0293175f647fe6bccf</id>
<content type='text'>
When leaving a scope, the new stack top should be set only after
closing any upvalue, to avoid manipulating values in an "invalid"
part of the stack.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When leaving a scope, the new stack top should be set only after
closing any upvalue, to avoid manipulating values in an "invalid"
part of the stack.
</pre>
</div>
</content>
</entry>
<entry>
<title>Multiple errors in '__toclose' report the first one</title>
<updated>2019-06-05T16:16:25+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-06-05T16:16:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=b4d5dff8ec4f1c8a44db66d368e95d359b04aea7'/>
<id>b4d5dff8ec4f1c8a44db66d368e95d359b04aea7</id>
<content type='text'>
When there are multiple errors when closing objects, the error
reported by the protected call is the first one, for two reasons:
First, other errors may be caused by this one;
second, the first error is handled in the original execution context,
and therefore has the full traceback.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When there are multiple errors when closing objects, the error
reported by the protected call is the first one, for two reasons:
First, other errors may be caused by this one;
second, the first error is handled in the original execution context,
and therefore has the full traceback.
</pre>
</div>
</content>
</entry>
<entry>
<title>Details</title>
<updated>2019-03-13T16:16:53+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-03-13T16:16:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=cf71a5ddc742692fad813f89f1c9ef53e1ffde0f'/>
<id>cf71a5ddc742692fad813f89f1c9ef53e1ffde0f</id>
<content type='text'>
Several small improvements (code style, warnings, comments, more tests),
in particular:

- 'lua_topointer' extended to handle strings
- raises an error in 'string.format("%10q")' ('%q' with modifiers)
- in the manual for 'string.format', the term "option" replaced by
  "conversion specifier" (the term used by the C standard)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several small improvements (code style, warnings, comments, more tests),
in particular:

- 'lua_topointer' extended to handle strings
- raises an error in 'string.format("%10q")' ('%q' with modifiers)
- in the manual for 'string.format', the term "option" replaced by
  "conversion specifier" (the term used by the C standard)
</pre>
</div>
</content>
</entry>
</feed>
