ASAN still reporting memory leak in `FcPatternObjectInsertElt`
After issue #302 (closed) and !202 (merged) we're still seeing a ClusterFuzz ASAN reported memory leak in FontConfig @311f6caa (current ToT).
The two leaking stack reports are happening downstream from FcConfigReference
and FcConfigParseAndLoadFromMemoryInternal
:
Direct leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x563d04757a4e in malloc third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
#1 0x7f1ba31785c8 in FcPatternObjectInsertElt third_party/fontconfig/src/src/fcpat.c:525:24
#2 0x7f1ba317b412 in FcPatternObjectAddWithBinding third_party/fontconfig/src/src/fcpat.c:711:9
#3 0x7f1ba3181434 in FcPatternAppend third_party/fontconfig/src/src/fcpat.c:1258:11
#4 0x7f1ba319ff13 in FcParsePattern third_party/fontconfig/src/src/fcxml.c:3112:11
#5 0x7f1ba31960d7 in FcEndElement third_party/fontconfig/src/src/fcxml.c:3237:2
#6 0x7f1ba3225be6 in xmlParseEndTag1 third_party/libxml/src/parser.c:8811:9
#7 0x7f1ba323438b in xmlParseTryOrFinish third_party/libxml/src/parser.c:11803:7
#8 0x7f1ba3231221 in xmlParseChunk third_party/libxml/src/parser.c:0
#9 0x7f1ba3194644 in FcConfigParseAndLoadFromMemoryInternal third_party/fontconfig/src/src/fcxml.c:3545:6
Indirect leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x563d04757c38 in calloc third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
#1 0x7f1ba317b32a in FcValueListCreate third_party/fontconfig/src/src/fcpat.c:136:12
#2 0x7f1ba317b32a in FcPatternObjectAddWithBinding third_party/fontconfig/src/src/fcpat.c:687:11
#3 0x7f1ba3181434 in FcPatternAppend third_party/fontconfig/src/src/fcpat.c:1258:11
#4 0x7f1ba319ff13 in FcParsePattern third_party/fontconfig/src/src/fcxml.c:3112:11
#5 0x7f1ba31960d7 in FcEndElement third_party/fontconfig/src/src/fcxml.c:3237:2
#6 0x7f1ba3225be6 in xmlParseEndTag1 third_party/libxml/src/parser.c:8811:9
#7 0x7f1ba323438b in xmlParseTryOrFinish third_party/libxml/src/parser.c:11803:7
#8 0x7f1ba3231221 in xmlParseChunk third_party/libxml/src/parser.c:0
#9 0x7f1ba3194644 in FcConfigParseAndLoadFromMemoryInternal third_party/fontconfig/src/src/fcxml.c:3545:6
Spun off from https://bugs.chromium.org/p/chromium/issues/detail?id=1410562
CC @bungeman