Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » CTRL + C = 659 Heap leaks
Re: CTRL + C = 659 Heap leaks [message #52067 is a reply to message #52058] Mon, 15 July 2019 06:15 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 890
Registered: December 2006
Experienced Contributor
mirek wrote on Fri, 12 July 2019 03:44

In win32, if you run this in console and press Ctrl+C:

PS C:\xxx> ./Console
Here
Exit


Heap leaks detected:

--memory-breakpoint__ 736 : Memory at 0x0000000006b1d570, size 0x4CC = 1228
    +0 0x0000000006B1D570 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65     FreeFreeFreeFree
   +16 0x0000000006B1D580 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65     FreeFreeFreeFree
   +32 0x0000000006B1D590 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65     FreeFreeFreeFree
   +48 0x0000000006B1D5A0 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65     FreeFreeFreeFree
PS C:\xxx>


This explains everything.
On Windows stack doesn't get unwinded, but descructors of global objects are still called. This is not a correct behavior.
In the old 32-bit Win ABI CRT was responsible for calling descructors of global objects. I do not know how this is implemented in the x64 ABI, most likely the same way.

When I strace my app in Linux I do see an exit_group(0) call on normal run (no CTRL-C).
I do not see any system calls when I press CTRL-C ...
This is an interesting topic ...
I guess, SIGINT is handled completely by glibc in Linux ...
Sending SIGINT directly to a process from another shell doesn't change anything ...


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How i can play a sound?? wav,mp3,ogg,aiff????
Next Topic: Filtering an ArrayCtrl
Goto Forum:
  


Current Time: Mon Nov 18 02:42:36 CET 2019

Total time taken to generate the page: 0.01958 seconds