DynamoRIO / DynamoRIO/drmemory

False positives below CloseEnhMetaFile

Open
#346 3 comments 0 reactions 0 assignees View on GitHub
Bug-FalsePositive Migrated Priority-Medium Reexamine-MissingSyms
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [timurrrr@google.com](https://code.google.com/u/timurrrr@google.com/) on April 11, 2011 12:00:29_

#include
#include

#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!ExtCreatePen
??:0
0x77f23d2d GDI32.dll!GetMiterLimit
??:0
0x77f230a3 GDI32.dll!CloseEnhMetaFile
??:0
0x0040105d test.exe!main
test.cpp:19

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

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.