Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives below CloseEnhMetaFile #346

Open
derekbruening opened this issue Nov 28, 2014 · 3 comments
Open

False positives below CloseEnhMetaFile #346

derekbruening opened this issue Nov 28, 2014 · 3 comments

Comments

@derekbruening
Copy link
Contributor

From timurrrr@google.com on April 11, 2011 12:00:29

#include <windows.h>
#include <assert.h>

#pragma comment(lib, "gdi32.lib")

int main() {
HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL);
assert(hdc != NULL);
Rectangle(hdc, 1, 1, 2, 2);

HENHMETAFILE emf = CloseEnhMetaFile(hdc);
DeleteEnhMetaFile(emf);
}

->

Error #1: UNINITIALIZED READ: reading register edx
@0:00:01.032 in thread 760
0x77f221cf <GDI32.dll+0x121cf> GDI32.dll!ExtCreatePen
??:0
0x77f23d2d <GDI32.dll+0x13d2d> GDI32.dll!GetMiterLimit
??:0
0x77f230a3 <GDI32.dll+0x130a3> GDI32.dll!CloseEnhMetaFile
??:0
0x0040105d <test.exe+0x105d> test.exe!main
test.cpp:19

Error #2: UNINITIALIZED READ: reading register edx
@0:00:01.047 in thread 760
0x77f221f0 <GDI32.dll+0x121f0> GDI32.dll!ExtCreatePen
??:0
0x77f23d2d <GDI32.dll+0x13d2d> GDI32.dll!GetMiterLimit
??:0
0x77f230a3 <GDI32.dll+0x130a3> GDI32.dll!CloseEnhMetaFile
??:0
0x0040105d <test.exe+0x105d> test.exe!main
test.cpp:19

Original issue: http://code.google.com/p/drmemory/issues/detail?id=346

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on April 11, 2011 09:05:28

Probably these reports are also related: http://build.chromium.org/p/chromium.fyi/builders/Windows%20Tests%20%28DrMemory%29/builds/3003/steps/memory%20test%3A%20printing/logs/stdio UNINITIALIZED READ: reading 0x0012f979-0x0012f97a 1 byte(s) within 0x0012f978-0x0012f97c

1 0x77f20af4 SetPolyFillMode GDI32.dll

2 0x77f2cd2c CreateICW GDI32.dll

3 0x005d7546 printing::Emf::Playback printing\emf_win.cc:105

4 0x00406b84 printing::EmfTest_FileBackedEmf_Test::TestBody printing\emf_win_unittest.cc:200

5 0x005bf267 testing::internal::HandleExceptionsInMethodIfSupportedtesting::Test,void testing\gtest\src\gtest.cc:2145

(these reports come from related tests)

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on April 11, 2011 09:06:50

Or could it be that DrMemory is missing the default pen/polyfillmode initializer in GDI32?

Cc: derek.br...@gmail.com

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on May 05, 2011 11:18:13

Labels: Reexamine-MissingSyms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant