summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-01-29 01:09:08 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-01-29 01:11:28 +0100
commitd87cbe82a683b13674ad8e943a638d4f0f62cb3b (patch)
treeb43e3fc5912c5844cb177b98b1dd42533ec93d33 /src
parentbe76d78b894022622622050e3cc5fcd882b54acc (diff)
downloadluaotfload-d87cbe82a683b13674ad8e943a638d4f0f62cb3b.tar.gz
[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.
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-letterspace.lua8
1 files changed, 6 insertions, 2 deletions
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