Closed Bug 449463 Opened 16 years ago Closed 16 years ago

outparams doesn't work on mac

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: vladimir.sukhoy)

References

Details

Attachments

(2 files, 1 obsolete file)

The outparams (treehydra) analysis doesn't seem to work on mac. I figured a couple fixes out myself (attached), but now I'm stuck with the following error:

/builds/gcc-dehydra/dehydra/libs/treehydra.js:12: JS Exception: No gstmt in this lazy object
:0:	#0: Error("No gstmt in this lazy object")
/builds/gcc-dehydra/dehydra/libs/treehydra.js:12:	#1: unhandledLazyProperty("gstmt")
/builds/gcc-dehydra/dehydra/libs/gcc_compat.js:89:	#2: GIMPLE_STMT_OPERAND([object GCCNode],1)
../../../src/xpcom/analysis/mayreturn.js:22:	#3: ([object GCCNode],[object Object])
/builds/gcc-dehydra/dehydra/libs/unstable/analysis.js:268:	#4: ([object GCCNode])
/builds/gcc-dehydra/dehydra/libs/unstable/analysis.js:228:	#5: ()
../../../src/xpcom/analysis/../../../src/xpcom/analysis/outparams.js:91:	#6: ()
../../../src/xpcom/analysis/../../../src/xpcom/analysis/outparams.js:88:	#7: process_tree([object GCCNode])
../../../src/xpcom/analysis/../../../src/xpcom/analysis/static-checking.js:70:	#8: process_tree([object GCCNode])
gmake[3]: *** [nsArrayUtils.o] Error 1

Also, I see isGCCApple and I'm almost certain that what we mean is "isGCC42", since that seems to be the real difference being checked.
Assignee: nobody → vladimir.sukhoy
Status: NEW → ASSIGNED
Indeed, "isGCC42" is more appropriate.
(In reply to comment #1)
> Indeed, "isGCC42" is more appropriate.
> 

Didn't we have this discussion before? I thought it turned out that apple has a funny way of doing call_exprs or something else that wouldn't be happening on GCC on non-apple platforms.
I think call_expr's arguments being stored on the chain (one of the more annoying things indeed) is actually gcc42. That we are using #ifdef APPLE to detect that is probably a bug. I think there are just a couple really apple-specific places in the code, I do recall though that detecting the target gcc version at compile time proved to be nontrivial. 
Attached patch treehydra fixesSplinter Review
This patch includes: these fixups in gcc compat JS layer and more of that, use isGCC42 instead of isGCCApple, gcc42-specific fix to treehydra bootstrapping to fix location to string conversion in treehydra that is used in outparams. Also need visibility fixups for gcc 4.2 from bug 449639. Basically outparams run with these two patches and the following patch to outparams themselves. I wonder who is the best reviewer for this atm?
Attachment #332582 - Attachment is obsolete: true
Attachment #335272 - Flags: review?
Attached patch outparams fixSplinter Review
Basically use a gcc42-compatible way to retrieving the function node for a call.
Attachment #335273 - Flags: review?
Depends on: 449639
Attachment #335273 - Flags: review? → review?(dmandelin)
Attachment #335272 - Flags: review? → review?(tglek)
Attachment #335273 - Flags: review?(dmandelin) → review+
Attachment #335272 - Flags: review?(tglek) → review+
Comment on attachment 335272 [details] [diff] [review]
treehydra fixes

good work.
Pushed treehydra fixes: b086b7e8aa3f, outparams mod: 5d2eb4202119.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Version: unspecified → Trunk
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: