<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 9, 2014 at 4:42 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jul 09, 2014 at 04:15:42PM -0700, Alexey Samsonov wrote:<br>
> Hi,<br>
><br>
> On Wed, Jul 9, 2014 at 1:42 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> wrote:<br>
><br>
> > On Wed, Jul 09, 2014 at 07:40:09PM -0000, Alexey Samsonov wrote:<br>
> > > Author: samsonov<br>
> > > Date: Wed Jul  9 14:40:08 2014<br>
> > > New Revision: 212643<br>
> > ><br>
> > > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=212643&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=212643&view=rev</a><br>
> > > Log:<br>
> > > Decouple llvm::SpecialCaseList text representation and its LLVM IR<br>
> > semantics.<br>
> > ><br>
> > > Turn llvm::SpecialCaseList into a simple class that parses text files in<br>
> > > a specified format and knows nothing about LLVM IR. Move this class into<br>
> > > LLVMSupport library. Implement two users of this class:<br>
> > >   * DFSanABIList in DFSan instrumentation pass.<br>
> > >   * SanitizerBlacklist in Clang CodeGen library.<br>
> > > The latter will be modified to use actual source-level information from<br>
> > frontend<br>
> > > (source file names) instead of unstable LLVM IR things (LLVM Module<br>
> > identifier).<br>
> > ><br>
> > > Remove dependency edge from ClangCodeGen/ClangDriver to<br>
> > LLVMTransformUtils.<br>
> > ><br>
> > > No functionality change.<br>
> ><br>
> > Okay.<br>
> ><br>
> > Do you have any further refactoring planned for SpecialCaseList? One change<br>
> > that I realised that I will need to make for DFSan is to change the<br>
> > semantics<br>
> > for symbol names appearing in the special case list so that they are always<br>
> > interpreted "literally", in order to allow symbol names that may contain<br>
> > regex metacharacters to be added to the StringSet. Of course this would be<br>
> > under a boolean argument somewhere so that the special case list semantics<br>
> > for the other sanitizers aren't affected.<br>
> ><br>
><br>
> No, I don't currently plan refactoring of SpecialCaseList, instead I'm<br>
> going change<br>
> the behavior of SanitizerBlacklist. Literal representation of<br>
> metacharacters (except for *)<br>
> sounds like a good idea - documentation refers to special case list entries<br>
> as "wildcard<br>
> expressions", not "regular expressions", so it would be weird to force<br>
> users to escape<br>
> characters on their own.<br>
<br>
</div></div>The patterns are referred to as "regular expressions" here, with examples<br>
that use RE syntax and specifically refer to the patterns as being EREs:<br>
<a href="http://clang.llvm.org/docs/SanitizerSpecialCaseList.html#format" target="_blank">http://clang.llvm.org/docs/SanitizerSpecialCaseList.html#format</a><br>
<br>
The examples don't seem particularly compelling to me. If not bound by<br>
compatibility constraints, I would make '*' the only recognized metacharacter.<br>
Maybe we should add support to SpecialCaseList for a "version 2" of the<br>
format which only supports '*'?<br></blockquote><div><br></div><div>Ah, indeed, I wrote this doc and now forgot about it =/</div><div>I'd also vote for making "*" the only metacharacter for simplicity. However, we can</div>
<div>probably just get away with silently changing it to be the case (and updating the docs).</div><div>I'm not aware of lots of blacklist users relying on the old behavior.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class=""><br>
> But, yes, let's make this change affect DFSan only<br>
> for now,<br>
> just add  an extra parameter to SpecialCaseList factory to specify if it<br>
> needs to escape<br>
> metachars when parsing the file.<br>
<br>
</div>OK, sounds good.<br>
<br>
Thanks,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Peter<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div></div>