Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Fix static-analysis bustage by using treehydra instead of dehydra. My…
Browse files Browse the repository at this point in the history
… theory is that the dehydra type cache is becoming confused by GCC tree GC which is reusing tree pointers for different types.
  • Loading branch information
bsmedberg committed Aug 7, 2009
1 parent dbf5d37 commit 38afd96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/static-checking-config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js

DEHYDRA_MODULES = \
$(topsrcdir)/xpcom/analysis/final.js \
$(topsrcdir)/layout/generic/frame-verify.js \
$(NULL)

TREEHYDRA_MODULES = \
$(topsrcdir)/xpcom/analysis/outparams.js \
$(topsrcdir)/xpcom/analysis/stack.js \
$(topsrcdir)/xpcom/analysis/flow.js \
$(topsrcdir)/js/src/jsstack.js \
$(topsrcdir)/layout/generic/frame-verify.js \
$(NULL)

DEHYDRA_ARGS = \
Expand Down
27 changes: 16 additions & 11 deletions layout/generic/frame-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,24 @@ let haveIDs = {};
// We match up needIDs with haveIDs at the end because static variables are
// not present in the .members array of a type

function process_decl(d)
function process_tree_decl(d)
{
if (d.name) {
if (frameIIDRE(d.name)) {
haveIDs[d.memberOf.name] = 1;
}
else if (queryFrameRE(d.name) && d.template === undefined) {
let templtype = d.type.type.type;
while (templtype.typedef !== undefined)
templtype = templtype.typedef;
d = dehydra_convert(d);

if (d.name && frameIIDRE(d.name)) {
haveIDs[d.memberOf.name] = 1;
}
}

function process_cp_pre_genericize(d)
{
d = dehydra_convert(d);
if (queryFrameRE(d.name) && d.template === undefined) {
let templtype = d.type.type.type;
while (templtype.typedef !== undefined)
templtype = templtype.typedef;

needIDs.push([templtype.name, d.loc]);
}
needIDs.push([templtype.name, d.loc]);
}
}

Expand Down

0 comments on commit 38afd96

Please sign in to comment.