[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

Ted Kremenek kremenek at apple.com
Sun Sep 9 13:35:28 PDT 2012


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).  Using the pointer address, however, is a big issue.  Thanks for pointing this out.  I will also take a look at SetVector.

Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120909/deafe541/attachment.html>


More information about the cfe-commits mailing list