On Sun, Sep 9, 2012 at 1:35 PM, Ted Kremenek <[email protected]> wrote:
> On Sep 8, 2012, at 12:45 AM, Chandler Carruth <[email protected]> > wrote: > > On Fri, Sep 7, 2012 at 9:26 PM, Ted Kremenek <[email protected]> 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.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
