[cfe-commits] r163455 [1/3] - in /cfe/trunk: lib/StaticAnalyzer/Core/PathDiagnostic.cpp test/Analysis/inline-plist.c test/Analysis/inlining/path-notes.c test/Analysis/malloc-plist.c test/Analysis/method-call-path-notes.cpp test/Analysis/nil-recei
Chandler Carruth
chandlerc at google.com
Sun Sep 9 13:55:07 PDT 2012
On Sun, Sep 9, 2012 at 1:35 PM, Ted Kremenek <kremenek at apple.com> wrote:
> On Sep 8, 2012, at 12:45 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
> On Fri, Sep 7, 2012 at 9:26 PM, Ted Kremenek <kremenek at apple.com> wrote:
>
>> Author: kremenek
>> Date: Fri Sep 7 23:26:37 2012
>> New Revision: 163455
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=163455&view=rev
>> Log:
>> Attempt (again) to stabilize the order of the emission of diagnostics
>> of the analyzer by using the FullProfile() of a PathDiagnostic
>> for ordering them.
>>
>
> I don't think this is the right strategy to get stable order of output.
> The profile and FoldingSetNodeIDs are fundamentally hash based and thus not
> suitable for ordering. It also seems to have pointers going into the hash,
> making it immediately unstable on systems with ASLR.
>
> I think you'll need something much more akin to the SetVector abstraction
> that tracks insertion order to get the determinism needed here.
>
>
> Hi Chandler,
>
> I don't believe that using FoldingSetNodeIDs is inherently the issue; the
> FoldingSetNodeIDs are just a collection of bits before they get hashed
> (which wasn't what I was doing).
>
Historically one or two places that use FoldingSet in LLVM actually have a
pre-hashed summary of their datastructure and they would just add that
integre into the profile. Nothing about the interface of the folding set
precluded this type of tree-style hashing being used to compose the key. I
don't know of any in Clang, but it seems like a big new constraint on the
interface.
> Using the pointer address, however, is a big issue. Thanks for pointing
> this out. I will also take a look at SetVector.
>
Yea, the pointers are a huge problem, and Clang pervasively uses pointers
in folding sets.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120909/3fa85686/attachment.html>
More information about the cfe-commits
mailing list