Fix static-analysis bustage by using treehydra instead of dehydra. My theory is that the dehydra type cache is becoming confused by GCC tree GC which is reusing tree pointers for different types.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 07 Aug 2009 11:16:26 -0400
changeset 31219 cc49a7b9649330ff5573349582c43b97afec40a2
parent 31218 9c37b8a909a245c05865a9fef1f1572e8f309eeb
child 31221 2e213af0a4050bad87c714123615fd43df5265ce
push idunknown
push userunknown
push dateunknown
milestone1.9.2a1pre
Fix static-analysis bustage by using treehydra instead of dehydra. My theory is that the dehydra type cache is becoming confused by GCC tree GC which is reusing tree pointers for different types.
config/static-checking-config.mk
layout/generic/frame-verify.js
--- a/config/static-checking-config.mk
+++ b/config/static-checking-config.mk
@@ -1,23 +1,23 @@
 # The entire tree should be subject to static analysis using the XPCOM
 # script. Additional scripts may be added by specific subdirectories.
 
 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 = \
   --topsrcdir=$(topsrcdir) \
   --objdir=$(DEPTH) \
   --dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(DEHYDRA_MODULES))) \
   --treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(TREEHYDRA_MODULES))) \
   $(NULL)
--- a/layout/generic/frame-verify.js
+++ b/layout/generic/frame-verify.js
@@ -51,29 +51,34 @@ let queryFrameRE = /^do_QueryFrame::oper
 let needIDs = [];
 
 /* A map of class names that have a kFrameIID declared */
 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]);
   }
 }
 
 function input_end()
 {
   for each (let [name, loc] in needIDs) {
     if (!haveIDs.hasOwnProperty(name)) {
       error("nsQueryFrame<%s> found, but %s::kFrameIID is not declared".format(name, name), loc);