Subject: [Boost-bugs] [Boost C++ Libraries] #7564: filesystem::path passed to GTest's assertion leads to stack overflow
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-24 16:25:22
#7564: filesystem::path passed to GTest's assertion leads to stack overflow
----------------------------------------------------+-----------------------
Reporter: oliora@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.51.0 | Severity: Problem
Keywords: filesystem gtest path "stack overflow" |
----------------------------------------------------+-----------------------
The following code:
{{{
boost::filesystem::path p1("c:\\123"), p2("c:\\987");
ASSERT_EQ(p1, p2);
}}}
leads to stack overflow.
It's because when GTest prints the assertion values it examines `path` as
a container and try to print its items which are also `path` instances.
This leads to recursion and stack overflow.
Most probably, the problem should be solved at Gtest side, but personal I
think the design when `path` consist of `path`s (infinite recursion) is
not very good and should be fixed.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7564> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC