Closed Bug 193574 Opened 23 years ago Closed 23 years ago

valgrind warning Use of uninitialised value of size 4 in nsInputStreamPump::OnStateTransfer when Available returns failure.

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED INVALID

People

(Reporter: timeless, Assigned: timeless)

Details

(Keywords: valgrind)

valgrind doesn't like this: nsInputStreamPump::OnStateTransfer() nsresult rv; PRUint32 avail; rv = mAsyncStream->Available(&avail); LOG((" Available returned [stream=%x rv=%x avail=%u]\n", mAsyncStream.get(), rv, avail)); ==2184== Use of uninitialised value of size 4 ==2184== at 0x40316906: cvt_l (/mnt/ibm/mozhack/mozilla/nsprpub/pr/src/io/prprf.c:268) ==2184== by 0x403179C5: dosprintf (/mnt/ibm/mozhack/mozilla/nsprpub/pr/src/io/prprf.c:861) ==2184== by 0x40318291: PR_vsnprintf (/mnt/ibm/mozhack/mozilla/nsprpub/pr/src/io/prprf.c:1164) ==2184== by 0x40315CC7: PR_LogPrint (/mnt/ibm/mozhack/mozilla/nsprpub/pr/src/io/prlog.c:430) ==2184== by 0x46352A4F: nsInputStreamPump::OnStateTransfer(void) (/mnt/ibm/mozhack/mozilla/netwerk/base/src/nsInputStreamPump.cpp:373) ==2184== by 0x463527BC: nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *) (/mnt/ibm/mozhack/mozilla/netwerk/base/src/nsInputStreamPump.cpp:321) ==2184== by 0x43202A47: ??? (/mnt/ibm/mozhack/mozilla/xpcom/io/nsStreamUtils.cpp:111) ==2184== by 0x4322B5D4: PL_HandleEvent (/mnt/ibm/mozhack/mozilla/xpcom/threads/plevent.c:663) I can make the logging more explicit for the different cases, or i can init avail...
not a bug. i don't care if we log a random value when NS_FAILED(rv). check the code following the LOG statement and you will see that avail is only referenced if NS_SUCCEEDED(rv). marking INVALID.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Keywords: valgrind
You need to log in before you can comment on or make changes to this bug.