Read near NULL when using an empty xsl:element's name inside a function
Stylesheet
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:func="http://exslt.org/functions" xmlns:abc="DEF" version="1.0" extension-element-prefixes="func">
<func:function name="abc:f">
<xsl:element name="{.}"/>
</func:function>
<xsl:variable name="v" select="abc:f()"/>
</xsl:stylesheet>
Source document
ASan log
xsl:element: The effective name '' is not a valid QName.
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3246==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000098 (pc 0x7f0f2f9ba290 bp 0x7ffeb2ec4110 sp 0x7ffeb2ec4000 T0)
==3246==The signal is caused by a READ memory access.
==3246==Hint: address points to the zero page.
#0 0x7f0f2f9ba28f in xsltElement /work/libxslt/libxslt/transform.c:4120:37
#1 0x7f0f2f9b3e31 in xsltApplySequenceConstructor /work/libxslt/libxslt/transform.c:2779:17
#2 0x7f0f2f9b385b in xsltApplyOneTemplate /work/libxslt/libxslt/transform.c:3351:2
#3 0x7f0f2f7200f3 in exsltFuncFunctionFunction /work/libxslt/libexslt/functions.c:440:5
#4 0x7f0f2f2ea1af in xmlXPathCompOpEval /work/libxml2/xpath.c:13457:17
#5 0x7f0f2f2e7d17 in xmlXPathCompOpEval /work/libxml2/xpath.c:13801:26
#6 0x7f0f2f2db2fd in xmlXPathRunEval /work/libxml2/xpath.c:14372:2
#7 0x7f0f2f2daa49 in xmlXPathCompiledEvalInternal /work/libxml2/xpath.c:14740:11
#8 0x7f0f2f2da992 in xmlXPathCompiledEval__internal_alias /work/libxml2/xpath.c:14786:5
#9 0x7f0f2f990dc3 in xsltEvalGlobalVariable /work/libxslt/libxslt/variables.c:1155:11
#10 0x7f0f2f98c468 in xsltEvalGlobalVariableWrapper /work/libxslt/libxslt/variables.c:1262:5
#11 0x7f0f2f26d78f in stubHashScannerFull /work/libxml2/hash.c:845:5
#12 0x7f0f2f26d5a0 in xmlHashScanFull__internal_alias /work/libxml2/hash.c:892:7
#13 0x7f0f2f26d3af in xmlHashScan__internal_alias /work/libxml2/hash.c:861:5
#14 0x7f0f2f98c156 in xsltEvalGlobalVariables /work/libxslt/libxslt/variables.c:1340:5
#15 0x7f0f2f9c196f in xsltApplyStylesheetInternal /work/libxslt/libxslt/transform.c:6033:5
#16 0x7f0f2f9c2c78 in xsltApplyStylesheetUser /work/libxslt/libxslt/transform.c:6288:11
#17 0x515c96 in xsltProcess /work/libxslt/xsltproc/xsltproc.c
#18 0x514a46 in main /work/libxslt/xsltproc/xsltproc.c:925:6
#19 0x7f0f2e17cb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#20 0x41b109 in _start (/usr/local/bin/xsltproc+0x41b109)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /work/libxslt/libxslt/transform.c:4120:37 in xsltElement
==3246==ABORTING