Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7632555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:39:22+00:00 2026-05-31T06:39:22+00:00

I’ve just downloaded DrMemory and wanted to check for memory leaks in my application

  • 0

I’ve just downloaded DrMemory and wanted to check for memory leaks in my application where I came across that DrMemory shows memory leaks on an “empty program”!

  1. Where do those memory leaks come from?
  2. And secondly, what is an example of what beginners often do wrong which causes DrMemory to complain about uninitialized access(es)?

Note that I am relatively new to C and all that native stuff, so I don’t understand most of the things DrMemory tells me here..

int main() {
}

gcc main.c -o a.exe
drmemory -show_reachable -- a.exe

Dr. Memory version 1.4.6 build 2 built on Mar  7 2012 10:14:04
Application cmdline: ""C:\Users\niklas\Desktop\a.exe""
Recorded 62 suppression(s) from default C:\DrMemory/bin/suppress-default.txt

REACHABLE LEAK 532 direct bytes 0x003e07d0-0x003e09e4 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 1152 direct bytes 0x003e09f0-0x003e0e70 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 8 direct bytes 0x003e11a8-0x003e11b0 + 0 indirect bytes
# 0 msvcrt.dll!towlower  
# 1 msvcrt.dll!towlower  
# 2 msvcrt.dll!clearerr_s
# 3 msvcrt.dll!clearerr_s
# 4 __mingw_CRTStartup
# 5 mainCRTStartup
# 6 KERNEL32.dll!BaseThreadInitThunk
# 7 ntdll.dll!RtlInitializeExceptionChain
# 8 ntdll.dll!RtlInitializeExceptionChain

REACHABLE LEAK 80 direct bytes 0x003e11d8-0x003e1228 + 0 indirect bytes
# 0 __cmshared_create_or_grab                 [../../../../gcc-4.4.1/libgcc/../gcc/config/i386/cygming-shared-data.c:145]
# 1 __gcc_register_frame
# 2 register_frame_ctor
# 3 __do_global_ctors
# 4 __mingw_CRTStartup
# 5 mainCRTStartup
# 6 KERNEL32.dll!BaseThreadInitThunk
# 7 ntdll.dll!RtlInitializeExceptionChain
# 8 ntdll.dll!RtlInitializeExceptionChain

REACHABLE LEAK 544 direct bytes 0x003e1568-0x003e1788 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 1863 direct bytes 0x003e1790-0x003e1ed7 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 4096 direct bytes 0x003e2780-0x003e3780 + 0 indirect bytes
# 0 msvcrt.dll!strcpy_s   +0x5f     (0x76aff5d3 <msvcrt.dll+0xf5d3>)
# 1 msvcrt.dll!wprintf    +0x142    (0x76b15f26 <msvcrt.dll+0x25f26>)
# 2 msvcrt.dll!printf     +0x35     (0x76b0c5ef <msvcrt.dll+0x1c5ef>)
# 3 main 

REACHABLE LEAK 24 direct bytes 0x005307d0-0x005307e8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE POSSIBLE LEAK 3526 direct bytes 0x005307f0-0x005315b6 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE POSSIBLE LEAK 2678 direct bytes 0x005315c0-0x00532036 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 60 direct bytes 0x00532040-0x0053207c + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 48 direct bytes 0x00532088-0x005320b8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 120 direct bytes 0x005320c0-0x00532138 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 120 direct bytes 0x00532140-0x005321b8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 540 direct bytes 0x005321c0-0x005323dc + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 66 direct bytes 0x005323e8-0x0053242a + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE POSSIBLE LEAK 120 direct bytes 0x00532438-0x005324b0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x005324b8-0x005324c8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 70 direct bytes 0x005324d0-0x00532516 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE POSSIBLE LEAK 120 direct bytes 0x00532520-0x00532598 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x005325b8-0x005325c8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x005325a0-0x005325b0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 66 direct bytes 0x005325d0-0x00532612 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532620-0x00532640 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 100 direct bytes 0x00532648-0x005326ac + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x005326b8-0x005326d8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 512 direct bytes 0x005326e0-0x005328e0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 512 direct bytes 0x005328e8-0x00532ae8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 36 direct bytes 0x00532af0-0x00532b14 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 36 direct bytes 0x00532b20-0x00532b44 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 48 direct bytes 0x00532b50-0x00532b80 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532b88-0x00532ba8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532bb0-0x00532bd0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532bd8-0x00532bf8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532c28-0x00532c48 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00532c50-0x00532c70 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x00532c78-0x00532c88 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 62 direct bytes 0x00532c90-0x00532cce + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 120 direct bytes 0x00532cd8-0x00532d50 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x00532d58-0x00532d68 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x00532d70-0x00532d80 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x00532d88-0x00532d98 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x00532da0-0x00532db0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 520 direct bytes 0x00532de0-0x00532fe8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 1024 direct bytes 0x00532ff0-0x005333f0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x005333f8-0x00533418 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00533420-0x00533440 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x00533448-0x00533468 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 206 direct bytes 0x005334e0-0x005335ae + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 16 direct bytes 0x005336f0-0x00533700 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 100 direct bytes 0x00533708-0x0053376c + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 120 direct bytes 0x00533778-0x005337f0 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 32 direct bytes 0x005337f8-0x00533818 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 62 direct bytes 0x00533820-0x0053385e + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 62 direct bytes 0x00533868-0x005338a6 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 36 direct bytes 0x005338d8-0x005338fc + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 24 direct bytes 0x00533908-0x00533920 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 8 direct bytes 0x00533928-0x00533930 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 1288 direct bytes 0x00533950-0x00533e58 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 888 direct bytes 0x00533e60-0x005341d8 + 0 indirect bytes
# 0 <not in a module> (0x00000000)

REACHABLE LEAK 520 direct bytes 0x00534888-0x00534a90 + 0 indirect bytes
# 0 ntdll.dll!RtlInitializeExceptionChain    +0x1e8    (0x7712b57a <ntdll.dll+0x5b57a>)
# 1 KERNELBASE.dll!GetEnvironmentVariableA   +0x18b    (0x752e7b22 <KERNELBASE.dll+0x7b22>)
# 2 msvcrt.dll!memicmp                       +0x85     (0x76b0074e <msvcrt.dll+0x1074e>)
# 3 msvcrt.dll!ismbblead                     +0x2f     (0x76aff637 <msvcrt.dll+0xf637>)
# 4 msvcrt.dll!ismbblead                     +0x12     (0x76aff61a <msvcrt.dll+0xf61a>)
# 5 msvcrt.dll!clearerr_s                    +0x3fa    (0x76b09fb0 <msvcrt.dll+0x19fb0>)
# 6 msvcrt.dll!clearerr_s                    +0x2e3    (0x76b09e99 <msvcrt.dll+0x19e99>)
# 7 msvcrt.dll!clearerr_s                    +0x27e    (0x76b09e34 <msvcrt.dll+0x19e34>)
# 8 __mingw_CRTStartup
# 9 mainCRTStartup
#10 KERNEL32.dll!BaseThreadInitThunk
#11 ntdll.dll!RtlInitializeExceptionChain

REACHABLE LEAK 644 direct bytes 0x00534b78-0x00534dfc + 0 indirect bytes
# 0 ntdll.dll!RtlLookupAtomInAtomTable
# 1 ntdll.dll!RtlCreateAtomTable
# 2 KERNEL32.dll!GetThreadId 
# 3 KERNEL32.dll!LocalUnlock 
# 4 KERNEL32.dll!FindAtomA   
# 5 __cmshared_create_or_grab               [../../../../gcc-4.4.1/libgcc/../gcc/config/i386/cygming-shared-data.c:140]
# 6 __gcc_register_frame
# 7 register_frame_ctor
# 8 __do_global_ctors
# 9 __mingw_CRTStartup
#10 mainCRTStartup
#11 KERNEL32.dll!BaseThreadInitThunk

REACHABLE POSSIBLE LEAK 32 direct bytes 0x00534e28-0x00534e48 + 0 indirect bytes
# 0 ntdll.dll!RtlInitializeCriticalSectionEx    +0x12b    (0x77127de3 <ntdll.dll+0x57de3>)
# 1 ntdll.dll!RtlInitializeCriticalSectionEx    +0x82     (0x77127d3b <ntdll.dll+0x57d3b>)
# 2 ntdll.dll!RtlInitializeCriticalSection      +0x11     (0x7712f8d0 <ntdll.dll+0x5f8d0>)
# 3 ntdll.dll!RtlCreateAtomTable                +0x8b     (0x770f8767 <ntdll.dll+0x28767>)
# 4 ntdll.dll!RtlCreateAtomTable                +0x60     (0x770f873c <ntdll.dll+0x2873c>)
# 5 KERNEL32.dll!GetThreadId                    +0x1e     (0x7726a912 <KERNEL32.dll+0x4a912>)
# 6 KERNEL32.dll!LocalUnlock                    +0x44     (0x772692ea <KERNEL32.dll+0x492ea>)
# 7 KERNEL32.dll!FindAtomA                      +0x10     (0x7725bac1 <KERNEL32.dll+0x3bac1>)
# 8 __cmshared_create_or_grab                    [../../../../gcc-4.4.1/libgcc/../gcc/config/i386/cygming-shared-data.c:140]
# 9 __gcc_register_frame
#10 register_frame_ctor
#11 __do_global_ctors

REACHABLE LEAK 158 direct bytes 0x00534f30-0x00534fce + 0 indirect bytes
# 0 ntdll.dll!RtlLookupAtomInAtomTable       +0x1f1    (0x770f86af <ntdll.dll+0x286af>)
# 1 ntdll.dll!RtlAddAtomToAtomTable          +0xbd     (0x770f5e8e <ntdll.dll+0x25e8e>)
# 2 KERNEL32.dll!GetSystemDefaultLCID        +0x395    (0x77269bfd <KERNEL32.dll+0x49bfd>)
# 3 KERNEL32.dll!AddAtomA                    +0x10     (0x77259ec9 <KERNEL32.dll+0x39ec9>)
# 4 __cmshared_create_or_grab                 [../../../../gcc-4.4.1/libgcc/../gcc/config/i386/cygming-shared-data.c:118]
# 5 __gcc_register_frame
# 6 register_frame_ctor
# 7 __do_global_ctors
# 8 __mingw_CRTStartup
# 9 mainCRTStartup
#10 KERNEL32.dll!BaseThreadInitThunk
#11 ntdll.dll!RtlInitializeExceptionChain

DUPLICATE ERROR COUNTS:

SUPPRESSIONS USED:

NO ERRORS FOUND:
      0 unique,     0 total unaddressable access(es)
      0 unique,     0 total uninitialized access(es)
      0 unique,     0 total invalid heap argument(s)
      0 unique,     0 total warning(s)
      0 unique,     0 total,      0 byte(s) of leak(s)
      0 unique,     0 total,      0 byte(s) of possible leak(s)
ERRORS IGNORED:
     64 still-reachable allocation(s)
Details: C:\DrMemory/drmemory/logs/DrMemory-a.exe.7400.000/results.txt
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:39:25+00:00Added an answer on May 31, 2026 at 6:39 am

    Perhaps not Dr. Memory, but an example of how users forget to initialize data is below. I’d describe these as the canonical way that people forget to initialize data. People forget that malloc does not clear the memory area.

    struct object_t {
        int x;
        int *y;
    };
    
    struct object_t *object = malloc(sizeof(struct object_t));
    
    if (object->y == NULL) {
        <Do stuff>
    }
    
    if (object->x == 32) {
        <Do stuff>
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.