This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] libstdc++: fix ext/rope::dump() bug
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Georeth Chow <georeth2010 at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 25 Jul 2016 13:56:46 +0100
- Subject: Re: [patch] libstdc++: fix ext/rope::dump() bug
- Authentication-results: sourceware.org; auth=none
- References: <CADhYE8Dim1BtL+SJpsVcH__GKs1bvmpgXv3hm6NcjAVVR_=FCQ@mail.gmail.com>
On 25/07/16 20:26 +0800, Georeth Chow wrote:
Hello, maintainers.
Recently, I tried to figure out how the rope container works by
dumping the content. I found that the implementation of rope::dump()
has a misspell bug which use a static member function as a enum value.
It seems that the original SGI STL implementation doesn't have this bug.
bug trigger code below.
#include <ext/rope>
int main() {
__gnu_cxx::crope r(100, 'x');
r.dump();
return 0;
}
patch is attached.
Thanks for the patch, I've committed it to trunk.
Fix missing qualification in <ext/rope>
2016-07-25 Georeth Chow <georeth2010@gmail.com>
* include/ext/ropeimpl.h (rope<>::_S_dump(_RopeRep*, int)): Qualify
_S_concat enumerator.
* testsuite/ext/rope/6.cc: New test.