Closed Bug 227135 Opened 21 years ago Closed 21 years ago

TestCallTemplates crashes - erroneous test

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: devon.miller2, Assigned: dougt)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

This test crashes on a read through an invalid pointer.

The comment here:
http://lxr.mozilla.org/seamonkey/source/xpcom/tests/TestCallTemplates.cpp#26

Indicates the test is not intended to run, only to build.

If that's the way it should work, please add an assert to stop execution
immediately.

I've marked this as critical because a test case should not crash when it is
working correctly!

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Attached patch Patch for TestCallTemplates.cpp (obsolete) — Splinter Review
This is adds an assertion to TestCallTemplates.cpp to prevent execution of the
test.
*** Bug 227133 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
Devon, if you want your patch to be used, you have to request review from one of
the module owners/peers. http://www.mozilla.org/owners.html#XPCOM lists them,
alecf or dougt *might* be responding quickest.
Comment on attachment 136568 [details] [diff] [review]
Patch for TestCallTemplates.cpp

Requesting review by dougt
Attachment #136568 - Flags: review?(dougt)
Comment on attachment 136568 [details] [diff] [review]
Patch for TestCallTemplates.cpp

defer to dbaron@dbaron.org
Attachment #136568 - Flags: review?(dougt) → review?(dbaron)
Comment on attachment 136568 [details] [diff] [review]
Patch for TestCallTemplates.cpp

Use NS_NOTREACHED, and don't use |#ifdef NS_DEBUG|, since the assertion macros
are all no-ops when DEBUG is not defined.  With those changes, r=dbaron.
Attachment #136568 - Flags: review?(dbaron) → review-
So more like this?
Attachment #136568 - Attachment is obsolete: true
Comment on attachment 145511 [details] [diff] [review]
updated fix per dbaron

Requesting r= from dbaron. Review comments addressed, successfully compiled and
tested.
Attachment #145511 - Flags: review?(dbaron)
Comment on attachment 145511 [details] [diff] [review]
updated fix per dbaron

I think XPCOM is review-only-zone, right?
Not sure if this needs approval, since 1.7 will not use this file. But tests
are built by default and better safe than sorry, so requesting approval1.7.
This is virtually no-risk, just an assertion in a test-file.
Attachment #145511 - Flags: approval1.7?
Comment on attachment 145511 [details] [diff] [review]
updated fix per dbaron

OTOH this can wait until Friday when the 1.7 branch is cut.
Removin approval request.
Attachment #145511 - Flags: approval1.7?
Patch checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verifying per lxr, credits for the patch go to Devon Miller.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: