http://llvm.org/bugs/show_bug.cgi?id=19678

            Bug ID: 19678
           Summary: libc++ does not correctly handle the regex: "[^\\0]*"
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 12490
  --> http://llvm.org/bugs/attachment.cgi?id=12490&action=edit
Test Case

Hello,

This report is mostly forwarded from StackOverflow:
http://stackoverflow.com/questions/23484952

As far as I can tell, the following regular expression should be supported by
ECMA-262.

    std::regex regex("[^\\0]*");

I've attached a simple test case (which can also be seen at stackoverflow) and
I've included a few runs below:

Using Clang 3.4 with libstdc++ 4.9.0 on Centos 6.5, we have what I believe is
the correct behavior (that is, no output).

    > /opt/llvm/3.4/bin/clang++ -std=c++11 --gcc-toolchain=/opt/gcc/4.9.0
-Wl,-rpath=/opt/gcc/4.9.0/lib64 re.cc
    > ./a.out

We can also use G++ 4.9.0, but that's probably not very interesting. (It
reports no output as well):

    > /opt/gcc/4.9.0/bin/g++ -std=c++11 re.cc
    > ./a.out

On OS X (the only place I have libc++), We see the following:

    > clang++ -std=c++11 re.cc 
    > ./a.out 
    libc++abi.dylib: terminating with uncaught exception of type
std::__1::regex_error: The expression contained an invalid escaped character,
or a trailing escape.
    Abort

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to