This is an archive of the discontinued LLVM Phabricator instance.

[LLDB/Lua] call lua_close() on Lua dtor
ClosedPublic

Authored by tammela on Nov 1 2020, 10:14 AM.

Details

Summary

This patch calls lua_close() on Lua dtor.

This guarantees that the Lua GC finalizers are honored, aside from the
usual internal clean up.

It also guarantees a call to the __close metamethod of any active
to-be-closed variable in Lua 5.4.

Since the previous luaL_openlibs() was a noop, because the standard
library is cached internally, I've removed it.

Diff Detail

Event Timeline

tammela created this revision.Nov 1 2020, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2020, 10:14 AM
tammela requested review of this revision.Nov 1 2020, 10:14 AM
JDevlieghere accepted this revision.Nov 1 2020, 4:33 PM

Thanks!

This revision is now accepted and ready to land.Nov 1 2020, 4:33 PM
This revision was landed with ongoing or failed builds.Nov 2 2020, 8:54 AM
This revision was automatically updated to reflect the committed changes.