[all-commits] [llvm/llvm-project] 4d7d6f: [LLDB/Lua] call lua_close() on Lua dtor

Pedro Tammela via All-commits all-commits at lists.llvm.org
Mon Nov 2 08:54:08 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d7d6f276c6df9e0a4cc3d9fccfaf84face62311
      https://github.com/llvm/llvm-project/commit/4d7d6f276c6df9e0a4cc3d9fccfaf84face62311
  Author: Pedro Tammela <pctammela at gmail.com>
  Date:   2020-11-02 (Mon, 02 Nov 2020)

  Changed paths:
    M lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h

  Log Message:
  -----------
  [LLDB/Lua] call lua_close() on Lua dtor

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.

Differential Revision: https://reviews.llvm.org/D90557




More information about the All-commits mailing list