From d87cbe82a683b13674ad8e943a638d4f0f62cb3b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 29 Jan 2017 01:09:08 +0100 Subject: [letterspace] address node deallocation issues With 1.0.3 the test pln-letterspace-12-double-ligature-issue-350.tex causes a crash on account of a double free. Remove the code that calls nodedirect.free() on the removed nodes until this is better understood. --- src/luaotfload-letterspace.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua index 78df1d7..5a56d31 100644 --- a/src/luaotfload-letterspace.lua +++ b/src/luaotfload-letterspace.lua @@ -61,7 +61,11 @@ local todirect = nodedirect.tonut local tonode = nodedirect.tonode local insert_node_before = nodedirect.insert_before -local free_node = nodedirect.free +local free_node = nodedirect.free -- may cause double free +local free_node = function (n) + logreport ("term", 5, "letterspace", "not calling free_node(%d)", n) + -- free_node (n) +end local copy_node = nodedirect.copy local new_node = nodedirect.new @@ -348,7 +352,7 @@ kerncharacters = function (head) end start = c setfield(s, "components", nil) - --free_node(s) --> double free with multipart components + free_node(s) --> double free with multipart components c = getfield (start, "components") end end -- cgit v1.2.3