public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/67015] New: "^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled
@ 2015-07-26  8:40 doko at gcc dot gnu.org
  2015-07-26  8:41 ` [Bug libstdc++/67015] " doko at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: doko at gcc dot gnu.org @ 2015-07-26  8:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67015

            Bug ID: 67015
           Summary: "^[a-z0-9][a-z0-9-]*$", std::regex::extended is
                    miscompiled
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

Created attachment 36055
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36055&action=edit
regex.cc

[forwarded from https://bugs.debian.org/778112]

This regex is failing:

  std::regex("^[a-z0-9][a-z0-9-]*$", std::regex::extended);

however this one works:

  std::regex("^[a-z0-9][-a-z0-9]*$", std::regex::extended); 

I'm unable to reproduce the claim in the original bug report with regex2.cc.

$ cat run.sh 
g++-4.8 -static-libstdc++ -std=c++0x regex.cc && ./a.out
g++-4.9 -static-libstdc++ -std=c++0x regex.cc && ./a.out
g++-5 -static-libstdc++ -std=c++0x regex.cc && ./a.out
/usr/lib/gcc-snapshot/bin/g++ -static-libstdc++ -std=c++0x regex.cc && ./a.out
clang++-3.5 -stdlib=libc++ -std=c++0x regex.cc && ./a.out
clang++-3.6 -stdlib=libc++ -std=c++0x regex.cc && ./a.out

g++-4.8 -static-libstdc++ -std=c++0x regex2.cc && ./a.out
g++-4.9 -static-libstdc++ -std=c++0x regex2.cc && ./a.out
g++-5 -static-libstdc++ -std=c++0x regex2.cc && ./a.out
/usr/lib/gcc-snapshot/bin/g++ -static-libstdc++ -std=c++0x regex2.cc && ./a.out
clang++-3.5 -stdlib=libc++ -std=c++0x regex2.cc && ./a.out
clang++-3.6 -stdlib=libc++ -std=c++0x regex2.cc && ./a.out

+ g++-4.8 -static-libstdc++ -std=c++0x regex.cc
+ ./a.out
E0: regex_error
a.out: regex.cc:24: int main(): Assertion `std::regex_match("test",
debian_cron_namespace)' failed.
Aborted (core dumped)
+ g++-4.9 -static-libstdc++ -std=c++0x regex.cc
+ ./a.out
E1: regex_error
+ g++-5 -static-libstdc++ -std=c++0x regex.cc
+ ./a.out
E1: regex_error
+ /usr/lib/gcc-snapshot/bin/g++ -static-libstdc++ -std=c++0x regex.cc
+ ./a.out
E1: regex_error
+ clang++-3.5 -stdlib=libc++ -std=c++0x regex.cc
+ ./a.out
+ clang++-3.6 -stdlib=libc++ -std=c++0x regex.cc
+ ./a.out
+ g++-4.8 -static-libstdc++ -std=c++0x regex2.cc
+ ./a.out
E0: regex_error
E1: regex_error
E2: regex_error
+ g++-4.9 -static-libstdc++ -std=c++0x regex2.cc
+ ./a.out
+ g++-5 -static-libstdc++ -std=c++0x regex2.cc
+ ./a.out
+ /usr/lib/gcc-snapshot/bin/g++ -static-libstdc++ -std=c++0x regex2.cc
+ ./a.out
+ clang++-3.5 -stdlib=libc++ -std=c++0x regex2.cc
+ ./a.out
+ clang++-3.6 -stdlib=libc++ -std=c++0x regex2.cc
+ ./a.out


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-05  4:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-26  8:40 [Bug libstdc++/67015] New: "^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled doko at gcc dot gnu.org
2015-07-26  8:41 ` [Bug libstdc++/67015] " doko at gcc dot gnu.org
2015-07-26 10:05 ` rleigh at debian dot org
2015-07-27 11:31 ` doko at gcc dot gnu.org
2015-07-29  3:46 ` timshen at gcc dot gnu.org
2015-07-29  4:31 ` timshen at gcc dot gnu.org
2015-07-29  4:45 ` timshen at gcc dot gnu.org
2015-07-29  9:34 ` ville.voutilainen at gmail dot com
2015-07-29 21:26 ` timshen at gcc dot gnu.org
2015-07-29 23:58 ` ville.voutilainen at gmail dot com
2015-07-31 22:31 ` i.zaufi at gmail dot com
2015-08-04  8:57 ` redi at gcc dot gnu.org
2015-08-04  8:57 ` redi at gcc dot gnu.org
2015-08-05  4:40 ` timshen at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).