Closed
Bug 587495
Opened 14 years ago
Closed 14 years ago
Extended regular expressions trash parameter memory
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 588273
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: neil, Unassigned)
Details
(Keywords: regression)
Steps to reproduce problem: Evaluate any or all of the following in 64-bit js.exe: /(?:)/.test('test1'); 'test1'; /(?=)/.test('test2'); 'test2'; /(?!!)/.test('test3'); 'test3'; Expected result: test1 test2 test3 Actual result: first four letters filled with garbage Additional information: /(?::)/.test('test4'); only fills two letters with garbage /(?==)/ and /(?!)/ do not trash their parameter
Comment 1•14 years ago
|
||
I can't repro on 64b Linux -- I think 64b PCRE may be what's screwing up here. /me shuffles stuff around to find his 64b windows VM...
Comment 2•14 years ago
|
||
Sorry, wasn't specific -- I think it's PCRE on 64b Windows, since we don't use the computed goto paths there. Had to set up my 64b windows VM tonight, will check it out tomorrow morn'.
Reporter | ||
Comment 3•14 years ago
|
||
It occurred to me that I could set a data breakpoint on the string memory. Having done this the breakpoint triggered in a RegexJITCode block called from JSC::Yarr::RegexCodeBlock::execute. And looking at the disassembly I notice that the JIT is using the GCC calling convention of rdi, esi, edx, rcx but MSVC wants rcx, edx, r8d, r9... I'm not sure what the best way of detecting for MSVC is, so I just tweaked my copy of RegexJIT.cpp to uncondtionally use the MSVC calling convention, and it seems to fix the issue.
Updated•14 years ago
|
blocking2.0: --- → ?
Comment 5•14 years ago
|
||
fixed by bug 588273?
Reporter | ||
Comment 6•14 years ago
|
||
Indeed; thanks, Gavin.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•