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

RESOLVED FIXED

Status

()

RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
[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]
(Assignee)

Comment 1

15 years ago
Created attachment 143571 [details] [diff] [review]
initialize field
(Assignee)

Comment 2

15 years ago
Comment on attachment 143571 [details] [diff] [review]
initialize field

this specific item is *very* noisy
Attachment #143571 - Flags: review?(dougt)

Comment 3

15 years ago
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?
(Assignee)

Comment 4

15 years ago
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 5

15 years ago
Comment on attachment 143571 [details] [diff] [review]
initialize field

r=dougt
Attachment #143571 - Flags: review?(dougt) → review+
(Assignee)

Comment 6

14 years ago
mozilla/xpcom/io/nsLocalFileWin.cpp 	1.127
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
(Assignee)

Comment 7

14 years ago
*** 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.