Closed Bug 237094 Opened 21 years ago Closed 21 years ago

[W] UMC: Uninitialized memory copy in nsLocalFile::nsLocalFile(nsLocalFile const&) {1 occurrence}

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(1 file)

[W] UMC: Uninitialized memory copy in nsLocalFile::nsLocalFile(nsLocalFile const&) {1 occurrence} Copying 32 bytes from 0x003eeaf8 (32 bytes at 0x003eeaf8 uninitialized) Address 0x003eeaf8 is 48 bytes into a 80 byte block at 0x003eeac8 Address 0x003eeaf8 points to a C++ new block in heap 0x003e0000 Thread ID: 0x70 Error location nsLocalFile::nsLocalFile(nsLocalFile const&)+0x12b [r:\cenzic\mozilla\xpcom\io\nslocalfilewin.cpp:450 ip=0x0047c99e] nsLocalFile::Clone(nsIFile * *)+0x51 [r:\cenzic\mozilla\xpcom\io\nslocalfilewin.cpp:700 ip=0x0047d52c] nsDirectoryService::Set(char const*,nsISupports *)+0x14a [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:684 ip=0x00478da7] nsDirectoryService::Get(char const*,nsID const&,void * *)+0x2b5 [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:650 ip=0x00478afb] NS_InitXPCOM2+0x483 [r:\cenzic\mozilla\xpcom\build\nsxpcominit.cpp:495 ip=0x00445aaa] ??? [C:\Documents and Settings\josh\root\cenzic\mozilla\rel-i586-pc-msvc\dist\bin\xpcshell.exe ip=0x00404046] ??? [C:\Documents and Settings\josh\root\cenzic\mozilla\rel-i586-pc-msvc\dist\bin\xpcshell.exe ip=0x00405092] Allocation location new(UINT)+0xc [f:\vs70builds\9466\vc\crtbld\crt\src\newop.cpp:10 ip=0x005084bc] nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile * *)+0x1e5 [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:143 ip=0x00479476] nsDirectoryService::GetFile(char const*,int *,nsIFile * *)+0xc6c [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:763 ip=0x0047a2eb] FindProviderFile+0x1ba [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:617 ip=0x004787bf] nsDirectoryService::Get(char const*,nsID const&,void * *)+0x394 [r:\cenzic\mozilla\xpcom\io\nsdirectoryservice.cpp:657 ip=0x00478bda] NS_InitXPCOM2+0x483 [r:\cenzic\mozilla\xpcom\build\nsxpcominit.cpp:495 ip=0x00445aaa] ??? [C:\Documents and Settings\josh\root\cenzic\mozilla\rel-i586-pc-msvc\dist\bin\xpcshell.exe ip=0x00404046] ??? [C:\Documents and Settings\josh\root\cenzic\mozilla\rel-i586-pc-msvc\dist\bin\xpcshell.exe ip=0x00405092]
Attached patch initialize fieldSplinter Review
Comment on attachment 143571 [details] [diff] [review] initialize field this specific item is *very* noisy
Attachment #143571 - Flags: review?(dougt)
Comment on attachment 143571 [details] [diff] [review] initialize field I do not see how this would fix the problem with the copy constructor. Also, I do not see any place where we use mFileInfo64 without first initalizing it. What does this buy us?
this gets rid of a lot of noise in purify, if you don't want it in release builds then i'd be willing to check this in ifdef DEBUG ala the font items
Comment on attachment 143571 [details] [diff] [review] initialize field r=dougt
Attachment #143571 - Flags: review?(dougt) → review+
mozilla/xpcom/io/nsLocalFileWin.cpp 1.127
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 251749 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: