Closed
Bug 495314
Opened 16 years ago
Closed 16 years ago
TM:uintN < 0 in ReconstructImacroPCStack
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 502241
People
(Reporter: igor, Assigned: graydon)
References
Details
(Keywords: fixed1.9.1, testcase)
ReconstructImacroPCStack contains:
uintN pcdepth = ReconstructPCStack(cx, script, fp->imacpc, pcstack);
if (pcdepth < 0)
return pcdepth;
That uintN should be intN here.
| Assignee | ||
Updated•16 years ago
|
Assignee: general → graydon
| Reporter | ||
Comment 1•16 years ago
|
||
There is more of this type of code which GCC 4.2 complains about in addition to the above fragment:
/home/igor/m/tm/js/src/jsopcode.cpp: In function 'intN SimulateImacroCFG(JSContext*, JSScript*, uintN, jsbytecode*, jsbytecode*, jsbytecode**)':
/home/igor/m/tm/js/src/jsopcode.cpp:5365: warning: comparison of unsigned expression >= 0 is always true
/home/igor/m/tm/js/src/jsopcode.cpp:5381: warning: comparison of unsigned expression >= 0 is always true
/home/igor/m/tm/js/src/jsopcode.cpp:5381: warning: comparison of unsigned expression >= 0 is always true
/
The line are:
5363 uintN tmp_pcdepth = SimulateImacroCFG(...
5365 if (tmp_pcdepth >= 0) {
5381 LOCAL_ASSERT(pcdepth >= 0);
In both cases it is caused by using an unsigned type in place of signed one.
| Assignee | ||
Comment 2•16 years ago
|
||
It appears that this was fixed in bug 502241. Aside from the new redundant cast to uintN and back to intN in the early return of ReconstructImacroPCStack. Close?
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•