Closed
Bug 468630
Opened 17 years ago
Closed 16 years ago
Crash in [@ js_NewStringCopyN]
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 463803
People
(Reporter: michal, Unassigned)
Details
(Keywords: crash)
Crash Data
I've experienced a crash when I tried to reproduce a bug #448141.
STR:
- enter following URL into location bar:
about:neterror?e=fileNotFound&u=file%3A///test1%3B.txt&c=UTF-8&d=Firefox%20can't%20find%20the%20file%20at%20/test1%3B.txt.
- Firefox will hang for a while and then it either continues normally or crashes.
I've noticed that it is reproducible f.e. with revision a1364547a182 but not with the latest TRUNK. And also it isn't reproducible with nightly builds. But I couldn't find any bug in bugzilla that fixes this issue, so maybe this can be still a potential crash even if it has disappeared. Problem is that firefox tries to allocate ca 3GB of memory in js_NewStringCopyN() and if it succeeds then there is a a segfault at http://mxr.mozilla.org/mozilla-central/source/js/src/jsstr.cpp#2905 because s is an invalid pointer. And of course if the allocation fails then firefox normally continues.
Problem seems to be that MatchRegExp() at http://mxr.mozilla.org/mozilla-central/source/js/src/jsregexp.cpp#3831 succeeds, re->parenCount is 1 but result->parens is invalid.
(gdb) p re->parenCount
$5 = 1
(gdb) p result->parens
$6 = {{index = -623191334, length = 3671775962}}
This happens for JS code at http://mxr.mozilla.org/mozilla-central/source/docshell/resources/content/netError.xhtml#92. Strange is that if I create a simple HTML with the same JS code and the same URL then it doesn't crash.
Comment 1•17 years ago
|
||
Doesn't hang or crash for me. I tried on Ubuntu 9.10 with Firefox 3.5.5, a 3.6 branch debug build, and a trunk debug build.
Michal, is it still hanging/crashing for you?
Comment 2•16 years ago
|
||
Luke, can you figure this out from the info in comment 0 or reproduce? If not we should probably mark the bug as worksforme.
Comment 3•16 years ago
|
||
Sure.
Michal, was your build debug or optimized?
Also, I tried looking at the mxr links in comment 0, but they don't seem to refer to what you are talking about. I guess they have become invalid; could you post a more permanent link, perhaps using http://hg.mozilla.org/mozilla-central?
Thanks!
| Reporter | ||
Comment 4•16 years ago
|
||
First of all, sorry for the late response.
My build was debug. I've just tried to find the last crashing revision and it is cb84ae597941. I'm not sure why I wasn't able to find it before, but it definitely seems to be dupe of 463803.
Severity: normal → critical
Keywords: crash
Summary: Crash in js_NewStringCopyN → Crash in [@ js_NewStringCopyN]
Comment 5•16 years ago
|
||
Thanks Michal!
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Crash Signature: [@ js_NewStringCopyN]
You need to log in
before you can comment on or make changes to this bug.
Description
•