Closed
Bug 491934
Opened 16 years ago
Closed 15 years ago
AVM -Dverifyonly switch
Categories
(Tamarin Graveyard :: Virtual Machine, enhancement)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
VERIFIED
FIXED
Future
People
(Reporter: tharwood, Assigned: edwsmith)
References
Details
Attachments
(1 file, 5 obsolete files)
|
1.86 KB,
patch
|
kpalacz
:
review+
|
Details | Diff | Splinter Review |
-Dverifyonly would verify eagerly, as does -Dverifyall, but not execute client code. Useful for testing verifier and JIT against e.g. code collected by the headless player without trying to execute the SWF.
Early experimentation indicates that the verifier/compiler subsystems depend on constructs initialized by executing the builtin AS code.
Updated•16 years ago
|
Target Milestone: --- → Future
| Assignee | ||
Comment 1•16 years ago
|
||
this is a big-ish patch that adds -Dverifyonly, and also adds a more concise listing of the verifier state for each method. this listing and associated verify errors is printed to stderr.
The patch also relaxes parsing of abc's with native methods; since we are only verifying, we allow the abc to be verified even though the native methods are missing.
invocation:
avmshell -Dverifyonly [your-host-builtins.abc] files...
Comment 2•16 years ago
|
||
Note, we currently ignore stagDoABC and process only stagDoABC2. This fixes that.
Attachment #425544 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•16 years ago
|
Attachment #425544 -
Flags: review?(edwsmith) → review+
Comment 3•15 years ago
|
||
Comment on attachment 425544 [details] [diff] [review]
Handle stagDoABC
http://hg.mozilla.org/tamarin-redux/rev/2ea67797b635
| Assignee | ||
Updated•15 years ago
|
Attachment #425544 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•15 years ago
|
||
Rebased, reverted short abc opcode names and increased indentation in TypeLister.
Assignee: nobody → edwsmith
Attachment #425505 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•15 years ago
|
||
changes from previous patch:
* print to stdout and use core->console, instead of stderr
* Consolidate error handling in Toplevel::throwVerifyError().
* make sure Assert messages have \n at the end
Putting all the error handling in throwVerifyError is cleaner, but is now exposing what seem to be latent bugs; in some cases it is possible to hit an assert instead of throwing a VerifyError, for cases when the Verifier causes Traits::_buildTraitsBindings() to be called with a NULL toplevel.
I don't know if this is a behavior unique to -Dverifyonly, or a real latent bug.
| Assignee | ||
Comment 6•15 years ago
|
||
changes since v3:
- rebased to Argo tip without cleanup patches
- stripped out TypeLister stuff
- added more ifdefs around verifyonly logic.
Attachment #427179 -
Attachment is obsolete: true
Attachment #427629 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 428915 [details] [diff] [review]
(v4) prototype of -Dverifyonly
This -Dverifyonly mode isn't critical in general but is essential for testing verifier changes.
squishy parts, feedback wanted:
- added fflush to ensure output is flushed before asserts happen
- added \n to assert message, i'm not sure this is the best place
- exit(1) ? alternative would be to throw some value (can't constuct any AS3 objects in this mode) and exit gracefully
-Dverifyonly is enabled whenever -Dverifyall is. alternatively we could make a dedicated feature switch.
Attachment #428915 -
Flags: superreview?(stejohns)
Attachment #428915 -
Flags: review?(kpalacz)
Comment 8•15 years ago
|
||
(In reply to comment #7)
> squishy parts, feedback wanted:
> - added fflush to ensure output is flushed before asserts happen
> - added \n to assert message, i'm not sure this is the best place
> - exit(1) ? alternative would be to throw some value (can't constuct any AS3
> objects in this mode) and exit gracefully
> -Dverifyonly is enabled whenever -Dverifyall is. alternatively we could make a
> dedicated feature switch.
All these sound like reasonable decisions for this feature.
Comment 9•15 years ago
|
||
Comment on attachment 428915 [details] [diff] [review]
(v4) prototype of -Dverifyonly
approved with two caveats:
-- I like the idea of doing fflush() in VMPI_debugBreak, but not so much in VMPI_debugLog; that will dramatically slow down debug builds. Are those absolutely necessary? If not, remove.
-- IMHO, all uses of config.verifyonly should be ifdef VMCFG_VERIFYALL (eg, Toplevel::getBuiltinClass, Traits::resolveSignaturesSelf)
Attachment #428915 -
Flags: superreview?(stejohns) → superreview+
Comment 10•15 years ago
|
||
AFAIK, if stdout is connected to a terminal, the output is line-buffered by default, so only logging non newline-terminated strings would be affected performance-wise. In any case, I'd move fflush() until after the message is printed.
I believe stderr is unbuffered by default, so it wouldn't need fflush(), and the man page says that abort() will flush all the streams (arguably, someone might have changed the defaults, so fflushing doesn't hurt).
Would we want this behavior on other platforms as well?
Do the changes in CodegenLIR belong in this patch?
Comment 11•15 years ago
|
||
Come think of it, the default buffering behavior for stdout is what we'd want (line buffering if connected to a terminal, otherwise let it rip), is there a case where not fflushing is an issue?
| Assignee | ||
Comment 12•15 years ago
|
||
I'm testing like this, typically:
avmshell .... >file.log 2>&1
And, without the flushes, when we hit an assert, the assert will end up near the end of the log file, but i want it on the last line, and i want the assert message on a line by itself with a newline. I have to admit i just sprinkled it in the fflush's, I will go back and find the minimal set. but i can say that at least one was required, to get my error.
> Do the changes in CodegenLIR belong in this patch?
I factored them into bug 548901. once i sort out the fflush stuff i'll repost with that part removed.
> -- IMHO, all uses of config.verifyonly should be ifdef VMCFG_VERIFYALL (eg,
Toplevel::getBuiltinClass, Traits::resolveSignaturesSelf)
agreed, any missing ifdefs is an oversight. i'll review and update the patch.
| Assignee | ||
Comment 13•15 years ago
|
||
Changes since v4
* reverted fflush's
* rebased
* added missing #ifdef VMCFG_VERIFYALL in a couple of places.
Attachment #428915 -
Attachment is obsolete: true
Attachment #430650 -
Flags: review?(kpalacz)
Attachment #428915 -
Flags: review?(kpalacz)
Updated•15 years ago
|
Attachment #430650 -
Flags: review?(kpalacz) → review+
| Assignee | ||
Comment 14•15 years ago
|
||
| Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 15•15 years ago
|
||
marking verified. Ran -Dverifyonly on brightspot and several other . We should add a verifier test harness to allow running -Dverifyonly on ats swfs, brightspot swfs, ... for regression testing the verifier. If we have a way of marking expected failures we could mark test cases where rsls are used (class not found) and the other failures occurring.
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
| Assignee | ||
Comment 16•15 years ago
|
||
Please, pretty please, can we get -Dverifyonly running some automated tests? A single test of hello.abc would have caught the injection from bug 582296.
Comment 17•15 years ago
|
||
What is the difference between -Dverifyall and -Dverifyonly. There are -Dverifyall runs in the deep phase on windows64 on the release-debugger and debug-debugger builds
| Assignee | ||
Comment 18•15 years ago
|
||
-Dverifyonly doesn't run any code, and also supports verifying real swfs (in conjunction with avmglue.abc). from usage:
[-Dverifyall] verify greedily instead of lazily
[-Dverifyonly] verify greedily and don't execute anything
Comment #15 outlines some ideas, but even the simple from comment #16 would be helpful.
Comment 19•15 years ago
|
||
Right, one just verifies and one verifies and executes... so wouldn't a complete acceptance run have caught this bug using the -Dverifyall switch? Just wondering why the build system was able to run with -Dverifyall and NOT hit this assert (it tested this against builds that _should_ have hit the assert). I'll take a close look at what is being run
Comment 20•15 years ago
|
||
we are running -Dverifyonly against all brightspot tests in mac-deep. It had not been running correctly for a while but did successfully run against 4975 on Aug-4. We could add running acceptance tests fairly easily using the mac-deep/scripts/run-brightspot.sh script.
Comment 21•15 years ago
|
||
Bug# 584758 was added to have the ability for runtests to handle running a -Dverifyonly pass, which once fixed we will be able to add a simple test into the smoke phase and then an additional pass in the deep phase
| Assignee | ||
Comment 22•15 years ago
|
||
couple observations
1. if a test fails in deep tests, how long before we find out about it?
2. if deep tests aren't running, how long before we find out?
3. a smoketest for one or two -Dverifyonly tests would be great and would have caught the injection.
(debug-debugger on any platform would be ideal)
Comment 23•15 years ago
|
||
I agree we should have simple acceptance tests to verify -Dverifyonly. deep test failures can take several builds to find and they are not treated as urgently as test phase failures.
Comment 24•15 years ago
|
||
Functionality added to runtests and buildbot: see 584758
See Also: → 584758
Updated•13 years ago
|
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•