<div dir="ltr">std::regex isn't implemented until GCC 4.9, and LLVM needs to work with GCC 4.8.  So unfortunately std::regex is out of the question.  <div><br></div><div>We can't straight up use llvm support because libfuzzer can't take a dependency on llvm, so it would have to be a re-write using LLVM support as a model for the algorithm.  It doesn't look very complicated to me.</div><div><br></div><div>That aside, from talks with kcc@ it seems that one of the important considerations with libfuzzer is to take as few dependencies as possible on external code, which was my motivation for not linking in shlapi.  This will also cause the application being fuzzed to link in shlapi as well, and it seems possible (albeit remote) to introduce behavioral changes.<div><br></div><div>So I think we should strive for minimal dependencies, especially on heavyweight user libraries like shlwapi.  If something is genuinely difficult to implement then it's a different story, but here we're talking about something only slightly more complicated than looking for the last backslash and chopping off everything that comes after.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 8, 2016 at 11:29 AM Marcos Pividori via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mpividori added a comment.<br class="gmail_msg">
<br class="gmail_msg">
It's based on the documentation for Naming Files, Paths, and Namespaces in: <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx" rel="noreferrer" class="gmail_msg" target="_blank">https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Repository:<br class="gmail_msg">
  rL LLVM<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D27579" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D27579</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>