Extensible Markup Language (XML) is a widely used file format for data storage and transmission. Many XML processors support XPath, a query language that enables the extraction of elements from XML documents. These systems can be affected by logic bugs, which are bugs that cause the processor to return incorrect results. In order to tackle such bugs, we propose a new approach, which we realized as a system called XPress. As a test oracle, XPress relies on differential testing, which compares the results of multiple systems on the same test input, and identifies bugs through discrepancies in their outputs. As test inputs, XPress generates both XML documents and XPath queries. Aiming to generate meaningful queries that compute non-empty results, XPress selects a so-called targeted node to guide the XPath expression generation process. Using the targeted node, XPress generates XPath expressions that reference existing context related to the targeted node, such as its tag name and attributes, while also guaranteeing that a predicate evaluates to true before further expanding the query. We tested our approach on six mature XML processors, BaseX, eXist-DB, Saxon, PostgreSQL, libXML2, and a commercial database system. In total, we have found 20 unique bugs in these systems, of which 25 have been verified by the developers, and 12 of which have been fixed. XPress is efficient, as it finds 12 unique bugs in BaseX in 24 hours, which is 2x as fast as naive random generation. We expect that the effectiveness and simplicity of our approach will help to improve the robustness of many XML processors.


翻译:可扩展标记语言(XML)是一种广泛用于数据存储和传输的文件格式。许多XML处理器支持XPath——一种能够从XML文档中提取元素的查询语言。这些系统可能受逻辑缺陷影响,即导致处理器返回错误结果的缺陷。为应对此类缺陷,我们提出了一种新方法,并将其实现为名为XPress的系统。作为测试预言,XPress采用差分测试技术,通过比较多个系统对同一测试输入的输出结果,借助输出差异识别缺陷。在测试输入方面,XPress同时生成XML文档和XPath查询。为生成能计算非空结果的有意义查询,XPress选择所谓的目标节点来引导XPath表达式生成过程。利用目标节点,XPress生成引用该节点相关上下文(如标签名和属性)的XPath表达式,同时确保谓词在进一步扩展查询前评估为真。我们对六款成熟的XML处理器(BaseX、eXist-DB、Saxon、PostgreSQL、libXML2及一款商业数据库系统)进行了测试。共发现20个独特缺陷,其中25个已获开发者确认,12个已被修复。XPress具有高效性,能在24小时内发现BaseX中的12个独特缺陷,速度是朴素随机生成的2倍。我们预期该方法简洁高效的特点将有助于提升众多XML处理器的鲁棒性。

0
下载
关闭预览

相关内容

XPath即为XML路径语言,它是一种用来确定XML(标准通用标记语言的子集)文档中某部分位置的语言。XPath基于XML的树状结构,提供在数据结构树中找寻节点的能力。起初 XPath 的提出的初衷是将其作为一个通用的、介于XPointer与XSLT间的语法模型。但是 XPath 很快的被开发者采用来当作小型查询语言。
Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
32+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
25+阅读 · 2023年6月23日
Principal Neighbourhood Aggregation for Graph Nets
Arxiv
17+阅读 · 2020年6月7日
Arxiv
15+阅读 · 2019年3月16日
VIP会员
最新内容
美海警海上态势感知无人系统
专知会员服务
2+阅读 · 今天5:10
《复杂系统数据驱动预测建模的数值框架》报告
专知会员服务
5+阅读 · 今天3:37
从“会话式人工智能”角度看“Maven智能系统”
专知会员服务
3+阅读 · 今天3:02
《无人机母舰:一种新兴的海军平台》报告
专知会员服务
4+阅读 · 今天2:51
【ICLR2026】基于小型语言模型的终身智能体
专知会员服务
10+阅读 · 4月27日
全面的反无人机系统培训计划
专知会员服务
2+阅读 · 4月27日
探秘Palantir:驱动美情报的科技巨头
专知会员服务
4+阅读 · 4月27日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员