<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - libc++ does not correctly handle the regex: "[^\\0]*""
href="http://llvm.org/bugs/show_bug.cgi?id=19678">19678</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>libc++ does not correctly handle the regex: "[^\\0]*"
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>william@lynch.us
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12490" name="attach_12490" title="Test Case">attachment 12490</a> <a href="attachment.cgi?id=12490&action=edit" title="Test Case">[details]</a></span>
Test Case
Hello,
This report is mostly forwarded from StackOverflow:
<a href="http://stackoverflow.com/questions/23484952">http://stackoverflow.com/questions/23484952</a>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>