Closed Bug 452674 Opened 16 years ago Closed 16 years ago

nanojit assertions defy automated testing

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: jruderman)

Details

Attachments

(1 file)

These problems make it very difficult to automate looking for assertion bugs:
* The actual error message goes to stdout rather than stderr.
* With NanoAssertMsg, the condition and line number and even the text "Assertion failed" are missing. The only hint that an assertion failed is the generic message in stderr.

These problems merely cause confusion:
* With NanoAssert, two extra sets of parens are shown.
* The second message is unnecessary and confusing: it makes it seem like the first message was not a fatal assertion.  The second message seems to come from DebugBreak->AvmAssert->assert (nanojit/avmplus.h).
* The filename is in quotes, which breaks pasting the filename along with the line number into a text editor.


Example 1:
NanoAssert(rmask(rr)&FpRegs);

stdout: Assertion failed: "((rmask(rr)&FpRegs))" ("nanojit/Nativei386.cpp":605)
stderr: nanojit/Nativei386.cpp:605: failed assertion `0'

Example 2:
NanoAssertMsg(0, "need a way to EOT now, since this is trace end");

stdout: need a way to EOT now, since this is trace end
stderr: nanojit/LIR.cpp:868: failed assertion `0'
Attached patch patchSplinter Review
Fixes all the complaints in comment 0.
Assignee: general → jruderman
Status: NEW → ASSIGNED
Attachment #335981 - Flags: review?(danderson)
Attachment #335981 - Flags: review?(danderson) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: