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 reports on SystemParametersInfo #10

Closed
derekbruening opened this issue Nov 28, 2014 · 7 comments
Closed

False reports on SystemParametersInfo #10

derekbruening opened this issue Nov 28, 2014 · 7 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on July 21, 2010 12:05:22

On Windows XP, build the following file:

#include <windows.h>
#pragma comment(lib, "User32.lib")
int main(void) {
NONCLIENTMETRICS metrics;
ZeroMemory(&metrics, sizeof(NONCLIENTMETRICS));
metrics.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &metrics, 0);
return 0;
}

$ cl test.c
$ drmemory.exe test.exe # r378 / r24 ...

Please note that I've seen these UxTheme reports in a few places, so this maybe related to a larger issue.

Attachment: report.txt

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

@derekbruening
Copy link
Contributor Author

From [email protected] on August 04, 2010 07:14:19

Labels: Bug-FalsePositive

@derekbruening
Copy link
Contributor Author

From [email protected] on July 15, 2011 11:45:44

fixed in r371 for issue #484 maybe this can be added to the app_suite?

Status: Fixed
Owner: [email protected]
Cc: [email protected]

@derekbruening
Copy link
Contributor Author

From [email protected] on July 15, 2011 11:47:50

Sure, no problem.
Should be as simple as copy-pasting

Status: Started

@derekbruening
Copy link
Contributor Author

From [email protected] on July 18, 2011 04:23:27

The test was added to app_suite in r398 and revealed a possible leak:
[XP 32-bit w/o symbols]
Error #1: POSSIBLE LEAK 80 direct bytes 0x000684a0-0x000684f0 + 0 indirect bytes
0x77f1ab26 <GDI32.dll+0xab26> GDI32.dll!GetBitmapBits
0x77f192cb <GDI32.dll+0x92cb> GDI32.dll!CreateFontIndirectExW
0x77f193e4 <GDI32.dll+0x93e4> GDI32.dll!CreateFontIndirectW
0x5ad7ae55 <UxTheme.dll+0xae55> UxTheme.dll!Ordinal25
0x5ad74693 <UxTheme.dll+0x4693> UxTheme.dll!GetThemeColor
0x5ad79602 <UxTheme.dll+0x9602> UxTheme.dll!IsThemeActive
0x5ad7ad7b <UxTheme.dll+0xad7b> UxTheme.dll!Ordinal25
0x7e427f06 <USER32.dll+0x17f06> USER32.dll!SetProcessWindowStation
0x7e428069 <USER32.dll+0x18069> USER32.dll!GetGUIThreadInfo
0x7c90e473 <ntdll.dll+0xe473> ntdll.dll!KiUserCallbackDispatcher
0x00406e26 <app_suite_tests.exe+0x6e26> app_suite_tests.exe!NtUserTests_SystemParametersInfoA_Test::TestBody
tests\app_suite\ntuser_tests_win.cpp:31

[Vista x64 w/o symbols]
Error #1: POSSIBLE LEAK 80 direct bytes 0x0119b2d0-0x0119b320 + 0 indirect bytes
0x771287a9 <GDI32.dll+0x187a9> GDI32.dll!CreatePatternBrush
0x77128675 <GDI32.dll+0x18675> GDI32.dll!CreateFontIndirectExW
0x77128724 <GDI32.dll+0x18724> GDI32.dll!CreateFontIndirectW
0x7509b50a <UxTheme.dll+0x1b50a> UxTheme.dll!ThemeInitApiHook
0x75091e9c <UxTheme.dll+0x11e9c> UxTheme.dll!Ordinal43
0x7509a9ed <UxTheme.dll+0x1a9ed> UxTheme.dll!GetThemeBitmap
0x7509b1ad <UxTheme.dll+0x1b1ad> UxTheme.dll!ThemeInitApiHook
0x76e71cbc <USER32.dll+0x21cbc> USER32.dll!SetWindowsHookExA
0x76e719f5 <USER32.dll+0x219f5> USER32.dll!RegisterClassExW
0x77aae496 <ntdll.dll+0x1e496> ntdll.dll!KiUserCallbackDispatcher
0x000c6e26 <app_suite_tests.exe+0x6e26> app_suite_tests.exe!NtUserTests_SystemParametersInfoA_Test::TestBody
tests\app_suite\ntuser_tests_win.cpp:31

[Win 7 x64 w/o symbols]
Error #1: POSSIBLE LEAK 80 direct bytes 0x01031280-0x010312d0 + 0 indirect bytes
0x76d75e29 <GDI32.dll+0x15e29> GDI32.dll!CreatePatternBrush
0x76d75bb0 <GDI32.dll+0x15bb0> GDI32.dll!CreateFontIndirectExW
0x76d75c63 <GDI32.dll+0x15c63> GDI32.dll!CreateFontIndirectW
0x73a45117 <UxTheme.dll+0x15117> UxTheme.dll!GetThemeBitmap
0x73a42a40 <UxTheme.dll+0x12a40> UxTheme.dll!Ordinal43
0x73a44215 <UxTheme.dll+0x14215> UxTheme.dll!IsThemePartDefined
0x73a446ed <UxTheme.dll+0x146ed> UxTheme.dll!ThemeInitApiHook
0x768facd4 <USER32.dll+0x1acd4> USER32.dll!UnregisterClassW
0x768fab0e <USER32.dll+0x1ab0e> USER32.dll!UnregisterClassW
0x77dd011a <ntdll.dll+0x1011a> ntdll.dll!KiUserCallbackDispatcher
0x01206e26 <app_suite_tests.exe+0x6e26> app_suite_tests.exe!NtUserTests_SystemParametersInfoA_Test::TestBody
tests\app_suite\ntuser_tests_win.cpp:31

Owner: [email protected]
Labels: -Priority-Medium Priority-Low

@derekbruening
Copy link
Contributor Author

From [email protected] on July 18, 2011 04:25:18

[XP 32-bits WITH symbols]
Error #1: POSSIBLE LEAK 80 direct bytes 0x00158790-0x001587e0 + 0 indirect bytes
0x77f1ab26 <GDI32.dll+0xab26> GDI32.dll!plfCreateLOCALFONT
0x77f192cb <GDI32.dll+0x92cb> GDI32.dll!CreateFontIndirectExW
0x77f193e4 <GDI32.dll+0x93e4> GDI32.dll!CreateFontIndirectW
0x5ad7ae55 <UxTheme.dll+0xae55> UxTheme.dll!CInternalNonclientMetrics::Acquire
0x5ad74693 <UxTheme.dll+0x4693> UxTheme.dll!NcGetNonclientMetrics
0x5ad79602 <UxTheme.dll+0x9602> UxTheme.dll!AcquireNcThemeMetrics
0x5ad7ad7b <UxTheme.dll+0xad7b> UxTheme.dll!OnHooksEnabled
0x7e427f06 <USER32.dll+0x17f06> USER32.dll!InitUserApiHook
0x7e428069 <USER32.dll+0x18069> USER32.dll!__ClientLoadLibrary
0x7c90e473 <ntdll.dll+0xe473> ntdll.dll!KiUserCallbackDispatcher
0x00401059 <test.exe+0x1059> test.exe!main
test.c:12

@derekbruening
Copy link
Contributor Author

From [email protected] on July 18, 2011 05:25:29

These leaks are suppressed in app_suite since r399

@derekbruening
Copy link
Contributor Author

From [email protected] on July 19, 2011 03:28:06

OK, looks like this possible leak report also shows up on issue #17 , so marking this as fixed.

Status: Fixed

gregcawthorne added a commit that referenced this issue Apr 17, 2021
AArch64 port of drmemory.

Only contains slowpath support with shared_slowpath off.

Pattern mode and fastpath modes are being worked on separately.

Depends on:
https://github.com/DynamoRIO/dynamorio/tree/mem-ref-for-clean-calls-aarch64/core

Current tests we have analysed:
Test project /home/grecaw01/APD-testing/drmem-upstream3/drmemory/build
      Start  1: drmf_proj
 1/49 Test  #1: drmf_proj .........................   Passed    0.45 sec
      Start  2: unit_tests
 2/49 Test  #2: unit_tests ........................   Passed    0.02 sec
      Start  3: hello
 3/49 Test  #3: hello .............................   Passed    3.55 sec
      Start  4: free
 4/49 Test  #4: free ..............................   Passed    3.67 sec
      Start  5: malloc
 5/49 Test  #5: malloc ............................   Passed    3.88 sec
      Start  6: leak_indirect
 6/49 Test  #6: leak_indirect .....................   Passed    3.52 sec
      Start  7: patterns
 7/49 Test  #7: patterns ..........................   Passed    3.93 sec
      Start  8: free.exitcode
 8/49 Test  #8: free.exitcode .....................   Passed    3.64 sec
      Start  9: track_origins
 9/49 Test  #9: track_origins .....................***Failed    0.34 sec
      Start 10: free.pattern
10/49 Test #10: free.pattern ......................***Failed    0.35 sec
      Start 11: malloc.pattern
11/49 Test #11: malloc.pattern ....................***Failed    0.34 sec
      Start 12: track_origins.pattern
12/49 Test #12: track_origins.pattern .............***Failed    0.34 sec
      Start 13: fuzz_corpus
13/49 Test #13: fuzz_corpus .......................   Passed    3.56 sec
      Start 14: fuzz_buffer
14/49 Test #14: fuzz_buffer .......................   Passed    4.62 sec
      Start 15: fuzz_buffer.replace_buffer
15/49 Test #15: fuzz_buffer.replace_buffer ........   Passed    4.62 sec
      Start 16: fuzz_buffer.overflow
16/49 Test #16: fuzz_buffer.overflow ..............***Failed    0.34 sec
      Start 17: fuzz_buffer.mutator.o-b-s-3
17/49 Test #17: fuzz_buffer.mutator.o-b-s-3 .......   Passed    4.59 sec
      Start 18: fuzz_buffer.mutator.r-b-s-3
18/49 Test #18: fuzz_buffer.mutator.r-b-s-3 .......   Passed    4.63 sec
      Start 19: fuzz_buffer.mutator.o-b-3
19/49 Test #19: fuzz_buffer.mutator.o-b-3 .........   Passed    4.60 sec
      Start 20: fuzz_buffer.mutator.r-n
20/49 Test #20: fuzz_buffer.mutator.r-n ...........   Passed    4.54 sec
      Start 21: fuzz_buffer.mutator.random_seed
21/49 Test #21: fuzz_buffer.mutator.random_seed ...   Passed    4.57 sec
      Start 22: fuzz_buffer.one-input
22/49 Test #22: fuzz_buffer.one-input .............   Passed    3.82 sec
      Start 23: fuzz_buffer.load_input
23/49 Test #23: fuzz_buffer.load_input ............   Passed    3.81 sec
      Start 24: fuzz_buffer.skip_initial
24/49 Test #24: fuzz_buffer.skip_initial ..........   Passed    4.01 sec
      Start 25: fuzz_buffer.fixed_size
25/49 Test #25: fuzz_buffer.fixed_size ............   Passed    5.36 sec
      Start 26: fuzz_buffer.offset
26/49 Test #26: fuzz_buffer.offset ................   Passed    5.42 sec
      Start 27: fuzz_buffer.module_name
27/49 Test #27: fuzz_buffer.module_name ...........   Passed    4.58 sec
      Start 28: fuzz_buffer.dictionary
28/49 Test #28: fuzz_buffer.dictionary ............   Passed    4.20 sec
      Start 29: fuzz_buffer.cpp
29/49 Test #29: fuzz_buffer.cpp ...................   Passed   17.77 sec
      Start 30: fuzz_custom_mutator
30/49 Test #30: fuzz_custom_mutator ...............   Passed    4.57 sec
      Start 31: drsyscall_test
31/49 Test #31: drsyscall_test ....................   Passed    0.22 sec
      Start 32: strace_test
32/49 Test #32: strace_test .......................   Passed    0.22 sec
      Start 33: drfuzz_test_empty
33/49 Test #33: drfuzz_test_empty .................   Passed    0.22 sec
      Start 34: drfuzz_test_mutator
34/49 Test #34: drfuzz_test_mutator ...............   Passed    2.38 sec
      Start 35: drfuzz_test_repeat
35/49 Test #35: drfuzz_test_repeat ................***Failed
      Start 36: drfuzz_test_segfault
36/49 Test #36: drfuzz_test_segfault ..............   Passed    0.20 sec
      Start 37: drfuzz_test_app_abort
37/49 Test #37: drfuzz_test_app_abort .............   Passed    0.22 sec
      Start 38: drfuzz_test_no_crash
38/49 Test #38: drfuzz_test_no_crash ..............   Passed    0.22 sec
      Start 39: umbra_test_empty
39/49 Test #39: umbra_test_empty ..................   Passed    0.22 sec
      Start 40: umbra_test_overlap
40/49 Test #40: umbra_test_overlap ................   Passed    0.23 sec
      Start 41: umbra_test_shadow_mem
41/49 Test #41: umbra_test_shadow_mem .............   Passed    0.30 sec
      Start 42: umbra_test_insert_app_to_shadow
42/49 Test #42: umbra_test_insert_app_to_shadow ...   Passed    0.29 sec
      Start 43: umbra_test_consistency
43/49 Test #43: umbra_test_consistency ............   Passed    0.30 sec
      Start 44: umbra_test_allscales
44/49 Test #44: umbra_test_allscales ..............   Passed    0.39 sec
      Start 45: drltrace
45/49 Test #45: drltrace ..........................   Passed    0.35 sec
      Start 46: drltrace_libcalls
46/49 Test #46: drltrace_libcalls .................   Passed    0.36 sec
      Start 47: drltrace_symargs
47/49 Test #47: drltrace_symargs ..................   Passed    0.36 sec
      Start 48: drltrace_libargs
48/49 Test #48: drltrace_libargs ..................   Passed    0.35 sec
      Start 49: strace_sample
49/49 Test #49: strace_sample .....................   Passed    0.22 sec

88% tests passed, 6 tests failed out of 49
gregcawthorne added a commit that referenced this issue Apr 17, 2021
AArch64 port of drmemory.

Only contains slowpath support with shared_slowpath off.

Pattern mode and fastpath modes are being worked on separately.

Currently this build does break some x86 functionality.

Depends on:
https://github.com/DynamoRIO/dynamorio/tree/mem-ref-for-clean-calls-aarch64/core

Current tests we have analysed:
Test project /home/grecaw01/APD-testing/drmem-upstream3/drmemory/build
      Start  1: drmf_proj
 1/49 Test  #1: drmf_proj .........................   Passed    0.45 sec
      Start  2: unit_tests
 2/49 Test  #2: unit_tests ........................   Passed    0.02 sec
      Start  3: hello
 3/49 Test  #3: hello .............................   Passed    3.55 sec
      Start  4: free
 4/49 Test  #4: free ..............................   Passed    3.67 sec
      Start  5: malloc
 5/49 Test  #5: malloc ............................   Passed    3.88 sec
      Start  6: leak_indirect
 6/49 Test  #6: leak_indirect .....................   Passed    3.52 sec
      Start  7: patterns
 7/49 Test  #7: patterns ..........................   Passed    3.93 sec
      Start  8: free.exitcode
 8/49 Test  #8: free.exitcode .....................   Passed    3.64 sec
      Start  9: track_origins
 9/49 Test  #9: track_origins .....................***Failed    0.34 sec
      Start 10: free.pattern
10/49 Test #10: free.pattern ......................***Failed    0.35 sec
      Start 11: malloc.pattern
11/49 Test #11: malloc.pattern ....................***Failed    0.34 sec
      Start 12: track_origins.pattern
12/49 Test #12: track_origins.pattern .............***Failed    0.34 sec
      Start 13: fuzz_corpus
13/49 Test #13: fuzz_corpus .......................   Passed    3.56 sec
      Start 14: fuzz_buffer
14/49 Test #14: fuzz_buffer .......................   Passed    4.62 sec
      Start 15: fuzz_buffer.replace_buffer
15/49 Test #15: fuzz_buffer.replace_buffer ........   Passed    4.62 sec
      Start 16: fuzz_buffer.overflow
16/49 Test #16: fuzz_buffer.overflow ..............***Failed    0.34 sec
      Start 17: fuzz_buffer.mutator.o-b-s-3
17/49 Test #17: fuzz_buffer.mutator.o-b-s-3 .......   Passed    4.59 sec
      Start 18: fuzz_buffer.mutator.r-b-s-3
18/49 Test #18: fuzz_buffer.mutator.r-b-s-3 .......   Passed    4.63 sec
      Start 19: fuzz_buffer.mutator.o-b-3
19/49 Test #19: fuzz_buffer.mutator.o-b-3 .........   Passed    4.60 sec
      Start 20: fuzz_buffer.mutator.r-n
20/49 Test #20: fuzz_buffer.mutator.r-n ...........   Passed    4.54 sec
      Start 21: fuzz_buffer.mutator.random_seed
21/49 Test #21: fuzz_buffer.mutator.random_seed ...   Passed    4.57 sec
      Start 22: fuzz_buffer.one-input
22/49 Test #22: fuzz_buffer.one-input .............   Passed    3.82 sec
      Start 23: fuzz_buffer.load_input
23/49 Test #23: fuzz_buffer.load_input ............   Passed    3.81 sec
      Start 24: fuzz_buffer.skip_initial
24/49 Test #24: fuzz_buffer.skip_initial ..........   Passed    4.01 sec
      Start 25: fuzz_buffer.fixed_size
25/49 Test #25: fuzz_buffer.fixed_size ............   Passed    5.36 sec
      Start 26: fuzz_buffer.offset
26/49 Test #26: fuzz_buffer.offset ................   Passed    5.42 sec
      Start 27: fuzz_buffer.module_name
27/49 Test #27: fuzz_buffer.module_name ...........   Passed    4.58 sec
      Start 28: fuzz_buffer.dictionary
28/49 Test #28: fuzz_buffer.dictionary ............   Passed    4.20 sec
      Start 29: fuzz_buffer.cpp
29/49 Test #29: fuzz_buffer.cpp ...................   Passed   17.77 sec
      Start 30: fuzz_custom_mutator
30/49 Test #30: fuzz_custom_mutator ...............   Passed    4.57 sec
      Start 31: drsyscall_test
31/49 Test #31: drsyscall_test ....................   Passed    0.22 sec
      Start 32: strace_test
32/49 Test #32: strace_test .......................   Passed    0.22 sec
      Start 33: drfuzz_test_empty
33/49 Test #33: drfuzz_test_empty .................   Passed    0.22 sec
      Start 34: drfuzz_test_mutator
34/49 Test #34: drfuzz_test_mutator ...............   Passed    2.38 sec
      Start 35: drfuzz_test_repeat
35/49 Test #35: drfuzz_test_repeat ................***Failed
      Start 36: drfuzz_test_segfault
36/49 Test #36: drfuzz_test_segfault ..............   Passed    0.20 sec
      Start 37: drfuzz_test_app_abort
37/49 Test #37: drfuzz_test_app_abort .............   Passed    0.22 sec
      Start 38: drfuzz_test_no_crash
38/49 Test #38: drfuzz_test_no_crash ..............   Passed    0.22 sec
      Start 39: umbra_test_empty
39/49 Test #39: umbra_test_empty ..................   Passed    0.22 sec
      Start 40: umbra_test_overlap
40/49 Test #40: umbra_test_overlap ................   Passed    0.23 sec
      Start 41: umbra_test_shadow_mem
41/49 Test #41: umbra_test_shadow_mem .............   Passed    0.30 sec
      Start 42: umbra_test_insert_app_to_shadow
42/49 Test #42: umbra_test_insert_app_to_shadow ...   Passed    0.29 sec
      Start 43: umbra_test_consistency
43/49 Test #43: umbra_test_consistency ............   Passed    0.30 sec
      Start 44: umbra_test_allscales
44/49 Test #44: umbra_test_allscales ..............   Passed    0.39 sec
      Start 45: drltrace
45/49 Test #45: drltrace ..........................   Passed    0.35 sec
      Start 46: drltrace_libcalls
46/49 Test #46: drltrace_libcalls .................   Passed    0.36 sec
      Start 47: drltrace_symargs
47/49 Test #47: drltrace_symargs ..................   Passed    0.36 sec
      Start 48: drltrace_libargs
48/49 Test #48: drltrace_libargs ..................   Passed    0.35 sec
      Start 49: strace_sample
49/49 Test #49: strace_sample .....................   Passed    0.22 sec

88% tests passed, 6 tests failed out of 49
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