Closed balazske closed 5 years ago
What can cause such error message?
[ERROR 2018-11-09 10:02] - Analyzing 'json_objectwriter.cc' with clangsa CTU
[ERROR 2018-11-09 10:02] -
[ERROR 2018-11-09 10:02] -
This problem seems to be fixed by #520. Observations: When running the same analysis command (0. line of stack dump above) the reported errors and warnings (and analysis sequence) are often different. The crash occurs in some of the cases (at most 1 out of 10).
Hi, I am currently familiarizing myself with the inner structure of CTU, so bear with my possibly stupid questions. Is the most recent Decl in this context not deterministic, and guaranteed to be the same over multiple runs?
If everything happens in the same sequence the most recent decl should be the same too. The FoundRecord
may be different: The FoundDecls
is a SmallPtrSet (currently, returned from ASTImporterLookupTable
) where the order of iteration is unspecified so FoundRecord
can be non-deterministic. (It depends on the memory address?) The most recent decl must be the same for any element of FoundDecls
, if there is no decl chain related bug.
Thanks, this explanation makes the fix clear to me.
Fixed.
The following error happens at protobuf analyze after commit 13b0400 "Continue ASTImporter error handling (#518)":