Closed Bug 495314 Opened 16 years ago Closed 16 years ago

TM:uintN < 0 in ReconstructImacroPCStack

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

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: general → graydon
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.
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.