boostorg / boostorg/property_tree

Stack-overflow with deep XML in boost::property_tree::xml_parser::read_xml_node

Open
#43 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
97
PR merge metrics
No merged PRs in 30d

Description

I'm using the property_tree to parse an XML with
```
std::wstringstream responseStream(response);
boost::property_tree::wptree responseTree;
boost::property_tree::read_xml(responseStream, responseTree);
```
and the stack-overflow error occurs in void boost::property_tree::xml_parser::read_xml_node when trying to parse considerably deep XMLs.

AddressSanitizer's trace:
[boost_property_tree_stack_overflow_AddressSanitizer.txt](https://github.com/boostorg/property_tree/files/3653037/boost_property_tree_stack_overflow_AddressSanitizer.txt)

Boost version: 1.66.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at boost::property_tree::xml_parser::read_xml_node, using the provided deeply nested XML reproduction and AddressSanitizer trace to understand where recursion exhausts the stack. Done means the reported deep XML can be parsed without a stack-overflow failure, with relevant regression coverage added if the repository provides a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.