ssbssa / heob Goto Github PK
View Code? Open in Web Editor NEWDetects buffer overruns and memory leaks.
License: Boost Software License 1.0
Detects buffer overruns and memory leaks.
License: Boost Software License 1.0
when I run mingw32-make in the default fold, the console make error and hint "extension if not specified. A single file name is an input file.No input-file is stdin, default rc. No output-file is stdout, default rc."
please tell me what is worry with it and how to fix this problem. thank you
Dear Hannes Domani,
I can not configure to be used in Qt Creator analogous
http://doc.qt.io/qtcreator/creator-heob.html
Thanks, Alex
Hi,
I have a crash with heob64.exe , when using Qt.
My heob (69f9c7d) did stop working after about 6 month with Application stopped unexpectedly
after working with it successfully for half a year.
There was no change in heob64.exe, Qt Creator or Qt.
I tried recompile with master (master commit f991cde), but same error .
heob being build with MSVC2015_64Bit.
To ensure it is not depending on my actual project, I created new projekt fom template, see attached.
The project is a new Qt Console Program generated with Qt Creator (4.10.0) from revision 9b7bab7d35
Compiler:MSVC2015_64Bit
OS:Win 10 Enterprise LTSC
Qt:5.12.4
project incl. leacks.xml:heobtest1.zip
environment:Win10,QT5.7.0-mingW.
In cmd.exe,input the commond:
D:\ProgramFiles\Qt\heob\heob-master\heob-master>D:\ProgramFiles\Qt\Qt5.7.0\Tools\mingw530_32\bin\mingw32-make.exe CPPFLAGS="-DNO_DWARFSTACK"
There is an error when i input an "enter"
Makefile:54: *** multiple target patterns. Stop.
what's wrong with my operation?
3Q!
I want to use heob in cmd.exe to test the app. How should I use it? Can you give me an example?
do you have plan to support Stack walk with FPOοΌFrame Pointer optimization) function,
this is a powerful application, but can not detect memory leak in dll wih /MTοΌcan it support library with /MT?
Hi, I just try to find some memory leak detect tool, so I goes to your project.
But I found that the latest release is from year 2019. So, if people has to clone your git repo and build the tool by himself? I'm mainly use mingw/gcc.
Thanks.
When using the "on" and "off" features, it's obvious that something has happened, but when using "clear" to clear the existing output, I'm never sure if the keypress actually registered. It would be good to have the "clear" text flash for half a second or something.
@ssbssa Thanks for putting together this tool π
To remove the "noise" associated with the project, I suggest disabling the following unused features if it still applies:
Go to General settings and disable the Wiki and Projects tabs |
If empty or unused, hide Packages section on the right side |
---|---|
It is just to simplify things.
For example, if user support is provided via a forum then it is better to turn off Discussions
, so that there is no need to monitor two user support sites, but only one.
If Releases
and Packages
are not used, so it is cleaner to hide them (to indicate that it is not the way how we manage releases and packages).
Projects
feature is rarely used in general and this repository does not use it either. If the user clicks on Projects
then an empty page is s displayed. It is better to not display the heading at all, to save the extra two clicks for users exploring the project.
Wiki on Github is meant to be a lighter weight tool for documentation. The issue is that it is too limited, for example contributors either can make changes directly (without pull request) or they cannot make changes at all. It also lead to write redundant content, since Github quite nicely renders markdown pages in the main repository. For small projects it is simpler and more consistent to keep all documentation in markdown files in the main repository.
Co-authored by @lassoan
This comment was adapted from my GitHub saved replies, it is licensed under a Creative Commons Attribution 4.0 International License and you were welcome to reuse it.
I'm a scrub when it comes to building stuff like this, usually just relying on qmake to handle everything for me. My naive attempt to do a shadow build with jom failed:
C:\dev>mkdir heob-build
C:\dev>cd heob-build
C:\dev\heob-build>jom CPPFLAGS="-DNO_DWARFSTACK" ..\heob\Makefile
Error: File Makefile doesn't exist.
nmake too:
C:\dev\heob-build>nmake CPPFLAGS="-DNO_DWARFSTACK" ..\heob\Makefile
Microsoft (R) Program Maintenance Utility Version 14.11.25507.1
Copyright (C) Microsoft Corporation. All rights reserved.
..\heob\Makefile(2) : fatal error U1033: syntax error : '=' unexpected
Stop.
So I gave in and did an in-source build:
C:\dev>cd heob
C:\dev\heob>jom CPPFLAGS="-DNO_DWARFSTACK"
Error: syntax error in C:\dev\heob\Makefile line 8
It would be good to have some complete build instructions in the README. :)
Hello, I also have this problem: - 1: error: Heob: Application stopped unexpectedly.
I don't know what the problem is, I have two projects locally, the small one has no problem, the big one reports an error. I hope you can give me some advice or help. Thank you very much.
The version of heob is 3.1.7, Qt Creator is 8.0.1, Base on Qt6.3.1 (MSVC 2019 x86_64) From revision 9c963ce8ae
The exe file of the debuggee cannot be re-linked until the console window is closed (APPLICATION EXIT
prompt).
I don't have MSVC 2017 installed on my PC , can I compile heob using MSVC 2010?
I have a Qt C++ application, which is crashing with a corrupted heap. I have installed heob and have been impressed with the output. However, the oddity is that I seem to be getting a very large number of memory leaks from Qtβs dynamic link libraries. I have set-up a program, which simply exits when I run it. This leaks 2000 bytes, from libwinpthread-1.dll, libgcc_s_seh-1.dll, Qt6Core.dll. When I run my full system, I obtain many millions of bytes of leaks.
I have tried two different versions of Qt: 5.15.14 and 6.5.1, with MinGW 64-bit and I get the same basic results with both. I am constrained in the versions of Qt that I can use, due to the code I have inherited.
So, my questions are as follows:
I can give more information about how I have heob set-up, if that would help.
Many thanks,
H
It's not possible to Select All + Copy heob's output in Qt Creator, and leaks.xml is very hard to read. There should be a (documented) way of creating human-readable reports from leaks.xml.
I'm trying to build heob in the hopes that I can get a backtrace for #7, but I get a bunch of errors:
C:\dev\heob\heob.qbs:4: warning: Referenced directory 'C:/dev/heob/dwarfstack/dwarfstack.qbs' does not contain a qbs file.
From the README, it seems that I should be able to build without the dwarfstack stuff (which seems to be a submodule), so I commented it out:
diff --git a/heob.qbs b/heob.qbs
index bcd1f67..0bd7fc2 100644
--- a/heob.qbs
+++ b/heob.qbs
@@ -1,7 +1,7 @@
import qbs
Project {
- references: "dwarfstack/dwarfstack.qbs"
+// references: "dwarfstack/dwarfstack.qbs"
CppApplication {
property string heob_base_ver: "2.1-dev"
@@ -14,7 +14,7 @@ Project {
}
name: "heob"
targetName: "heob" + (qbs.architecture === "x86_64" ? '64' : '32')
- Depends { name: "dwarfstack" }
+// Depends { name: "dwarfstack" }
consoleApplication: true
cpp.windowsApiCharacterSet: "mbcs"
cpp.defines: "HEOB_VER=\"" + heob_ver + "\""
Then I get:
compiling heob.c
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX86/x64/cl.exe /nologo /c /EHsc /Od /Zi /MDd /Wall /D_MBCS /DWIN32 "/DHEOB_VER="^""2.1-dev-2018-04-06"^""" /FoC:\dev\heob-Desktop_Qt_5_9_4_MSVC2017_64bit-Debug\qtc_Desktop_Qt_5_9_4_MSVC2017_64bit_Debug\heob.83268501\3a52ce780950d4d9\heob-inj.c.obj C:\dev\heob\heob-inj.c /TC /FS -Wshadow -fno-omit-frame-pointer -fno-optimize-sibling-calls -ffreestanding
cl : Command line error D8021 : invalid numeric argument '/Wshadow'
I'm trying to run a self-built heob in Qt Creator, but get the following error message:
The Heob executables must be in the appropriate location.
This is the build output from build.bat on a Windows 10 machine:
C:\dev\heob>build.bat
C:\dev\heob>echo C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64; | find /i "lib\amd64" 1>NUL
C:\dev\heob>if errorlevel 1 (set bits=32 ) else (set bits=64 )
C:\dev\heob>if not exist obj32 mkdir obj32
C:\dev\heob>if defined HEOB_VERSION set HEOB_VERSION_RC=/d HEOB_VER_STR=""
C:\dev\heob>if defined HEOB_VER_NUM set HEOB_VER_NUM_RC=/d HEOB_VER_NUM=
C:\dev\heob>if defined HEOB_PRERELEASE set HEOB_PRERELEASE_RC=/d HEOB_PRERELEASE=
C:\dev\heob>if defined HEOB_COPYRIGHT_YEARS set HEOB_COPYRIGHT_YEARS_RC=/d HEOB_COPYRIGHT_YEARS=""
C:\dev\heob>set RCFLAGS=
C:\dev\heob>if not defined DWSTFLAGS set DWSTFLAGS=/D NO_DWARFSTACK
C:\dev\heob>if not defined HEOB_VERSION set HEOB_VERSION=vc-dev
C:\dev\heob>set HEOBVER=/D "HEOB_VER="vc-dev""
C:\dev\heob>set CFLAGS=/GS- /W3 /Gy- /Zc:wchar_t /D NO_DWARFSTACK /Gm- /O2 /Ob0 /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "HEOB_VER="vc-dev"" /D "_MBCS" /errorReport:prompt /GF- /WX /Zc:forScope /GR- /Gd /Oy- /Oi /MD /openmp- /nologo /Fo"obj32\" /Ot /wd4996
C:\dev\heob>set LDFLAGS=/NXCOMPAT /DYNAMICBASE "kernel32.lib" /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /NODEFAULTLIB /TLBID:1
C:\dev\heob>rc /foobj32\heob-ver.res heob-ver.rc
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.C:\dev\heob>if errorlevel 1 goto error
C:\dev\heob>cl /c /GS- /W3 /Gy- /Zc:wchar_t /D NO_DWARFSTACK /Gm- /O2 /Ob0 /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "HEOB_VER="vc-dev"" /D "_MBCS" /errorReport:prompt /GF- /WX /Zc:forScope /GR- /Gd /Oy- /Oi /MD /openmp- /nologo /Fo"obj32\" /Ot /wd4996 heob.c
heob.cC:\dev\heob>if errorlevel 1 goto error
C:\dev\heob>cl /c /GS- /W3 /Gy- /Zc:wchar_t /D NO_DWARFSTACK /Gm- /O2 /Ob0 /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "HEOB_VER="vc-dev"" /D "_MBCS" /errorReport:prompt /GF- /WX /Zc:forScope /GR- /Gd /Oy- /Oi /MD /openmp- /nologo /Fo"obj32\" /Ot /wd4996 heob-inj.c
heob-inj.cC:\dev\heob>if errorlevel 1 goto error
C:\dev\heob>link /OUT:"heob32.exe" /NXCOMPAT /DYNAMICBASE "kernel32.lib" /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /NODEFAULTLIB /TLBID:1 /IMPLIB:obj32\heob.lib obj32\heob.obj obj32\heob-inj.obj obj32\heob-ver.res
Creating library obj32\heob.lib and object obj32\heob.expC:\dev\heob>if errorlevel 1 goto error
C:\dev\heob>goto eof
C:\dev\heob>
I get the following build artifacts:
C:\dev\heob>tree /F
Folder PATH listing for volume Windows
Volume serial number is C056-E24F
C:.
β .gitignore
β .gitmodules
β allocer.cpp
β build.bat
β crt32-vc6.def
β crt32.def
β crt64.def
β dll-alloc.cpp
β heob-inj.c
β heob-internal.h
β heob-ver.rc
β heob.c
β heob.h
β heob.ico
β heob.manifest
β heob.qbs
β heob.qbs.user
β heob32.exe
β LICENSE_1_0.txt
β logo-16.png
β Makefile
β README.md
β vc.bat
β
ββββdwarfstack
ββββobj32
β heob-inj.obj
β heob-ver.res
β heob.exp
β heob.lib
β heob.obj
β
ββββqt-creator
β .gitignore
β heob.json.in
β heob.pro
β heobconstants.h
β heobplugin.cpp
β heobplugin.h
β
ββββtestres
test-01.txt
test-02.txt
test-03.txt
The problem could be that the x64 binaries aren't built? I'm using the x64 command prompt.
Hello,
Thank you for this great tool. I have been using it for some time and it really helps me to catch those really annoying and hard to find memory bugs.
I would like to know if it is possible to start heob in some type of disabled state, without memory leaks checking, and activate it later during the target application usage. I am using heob from the command prompt and the target application is a c++ visual studio application.
Thanks in advance,
JosΓ© CalvΓ‘rio
Yesterday, i want to use heob to check my qt application. but, when i run heob for12 hours, it still running and the Cpu occupancy rate is still very high, the memory used 4G but almost no decline.
I don't know if it is running normally.
my qt version is 5.11
and my heob version is 2.1.7
my vs version is 2017 vc++ 15.0 x64
Thanks for your participation.
The extra heob window is blocked, and pressing keys has no effect.
I would like to have a breakpoint in my application, then enable heob, and on another breakpoint stop it.
Another alternative is to introduce an API similar to CALLGRIND_START_INSTRUMENTATION
and STOP
.
Hi.
I am having trouble building heob in 64-bit mode. When executing "build.bat" I get the following output:
C:\Users\thomas.lassen\source\heob>echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\lib\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86" | find /i "lib\amd64" 1>NUL
C:\Users\thomas.lassen\source\heob>if errorlevel 1 (
echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\lib\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86" | find /i "lib\x64" 1>NUL
if errorlevel 1 (set bits=32 ) else (set bits=64 )
) else (set bits=64 )
I have checked to see if the x64 libs are installed on my machine, and they are, but they are apparently not found. How can I determine how the value %lib% is set?
I have searched for a solution elsewhere, but have not been successful in finding one.
Apologies in advance for being such a noob.
Hi,
I want to use this tool to check the memory leak in QtCreator.
But, when I exit the test app, the heob app while stopped.
I tried both solutions with the same results:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.