Closed Bug 320951 Opened 20 years ago Closed 20 years ago

ASSERTION: file too large: 'Error', mozJSComponentLoader.cpp line 1084

Categories

(Core :: XPConnect, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 obsolete file)

failure to rv check an xpcom api can result in very bogus behavior. this is a good example. the actual error returned by ResolveAndStat was 0x80520012. the error is ignored by mozJSComponentLoader, so instead it uses an uninitalized (xpcom says that the callee could leave garbage, you can't preinit and *must* rv check) value. 0:000> kP n # ChildEBP RetAddr 00 0012d804 0122823f xpcom_core!nsLocalFile::GetFileSize( int64 * aFileSize = 0x0012d8cc)+0x3f [r:\mozilla\xpcom\io\nslocalfilewin.cpp @ 1779] 01 0012da0c 01225ab9 xpc3250!mozJSComponentLoader::GlobalForLocation( class nsILocalFile * aComponent = 0x027fad98, struct JSObject ** aGlobal = 0x020639c4, char ** aLocation = 0x020639c8)+0xb0f [r:\mozilla\js\src\xpconnect\loader\mozjscomponentloader.cpp @ 1082] 02 0012dc18 00e4b476 xpc3250!mozJSComponentLoader::LoadModule( class nsILocalFile * aComponentFile = 0x027fad98, class nsIModule ** aResult = 0x0012dc78)+0x289 [r:\mozilla\js\src\xpconnect\loader\mozjscomponentloader.cpp @ 531] 03 0012dc7c 00e470e0 xpcom_core!nsFactoryEntry::GetFactory( class nsIFactory ** aFactory = 0x0012dd60)+0x176 [r:\mozilla\xpcom\components\nscomponentmanager.cpp @ 3578]
Attached patch look before leaping (obsolete) — Splinter Review
Assignee: dbradley → timeless
Status: NEW → ASSIGNED
Attachment #206386 - Flags: superreview?(darin)
Attachment #206386 - Flags: review?(dbradley)
Comment on attachment 206386 [details] [diff] [review] look before leaping r=dbradley Always good to check the return value.
Attachment #206386 - Flags: review?(dbradley) → review+
Attachment #206386 - Flags: superreview?(darin) → superreview+
Comment on attachment 206386 [details] [diff] [review] look before leaping mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp 1.120
Attachment #206386 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: