This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/63990] New: regex_search increments a past-the-end iterator
- From: "kariya_mitsuru at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Nov 2014 09:49:47 +0000
- Subject: [Bug libstdc++/63990] New: regex_search increments a past-the-end iterator
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63990
Bug ID: 63990
Summary: regex_search increments a past-the-end iterator
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kariya_mitsuru at hotmail dot com
Created attachment 34049
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34049&action=edit
g++ -v
The sample code below is aborted with "attempt to increment a past-the-end
iterator".
=========================================================================
#include <regex>
#include <debug/string>
int main()
{
__gnu_debug::string s = "a";
std::regex_search(s.begin(), s.end(), std::regex("b"));
}
=========================================================================
cf. http://melpon.org/wandbox/permlink/2EesivDageAWjAnN
It seems that it always occurs if regex_search is not matched.
It also seems that such an iterator is never accessed.
cf. http://melpon.org/wandbox/permlink/PfGxfu5qjoqaDgEm
I think that it may not cause any problem.
But it is better to fix.