aboutsummaryrefslogtreecommitdiffstats
path: root/spec/json/fail22.json
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-20 09:57:20 +0100
committerKim Alvefur <zash@zash.se>2022-01-20 09:57:20 +0100
commitd17619344dda05f9bc9b3f98a0c82f2f68939605 (patch)
tree523dfd5c7ee5a52ada870d12a315bca4f5ab3a61 /spec/json/fail22.json
parent695fb9b8fb478cef3dd5ec5e35d704cdba5dffae (diff)
downloadprosody-d17619344dda05f9bc9b3f98a0c82f2f68939605.tar.gz
prosody-d17619344dda05f9bc9b3f98a0c82f2f68939605.zip
util.xml: Break reference to help the GC (fix #1711)
LuaExpat uses a registry reference to track handlers, which makes it so that an upvalue like this creates a reference loop that keeps the parser and its handlers from being garbage collected. The same issue has affected util.xmppstream in the past. Code for checking: local xml_parse = require"util.xml".parse; for i = 1, 10000 do xml_parse("<root/>") end collectgarbage(); collectgarbage(); print(collectgarbage("count"), "KiB"); A future release of LuaExpat may fix the underlying issue there.
Diffstat (limited to 'spec/json/fail22.json')
0 files changed, 0 insertions, 0 deletions