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 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate 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
|
|
|
|
|
CTRL + C = 659 Heap leaks
By: Xemuth on Wed, 10 July 2019 21:05
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Thu, 11 July 2019 06:06
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Thu, 11 July 2019 09:36
|
|
|
Re: CTRL + C = 659 Heap leaks
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Thu, 11 July 2019 17:10
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Thu, 11 July 2019 10:10
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Thu, 11 July 2019 10:22
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Thu, 11 July 2019 16:42
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Fri, 12 July 2019 00:15
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Fri, 12 July 2019 00:18
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Fri, 12 July 2019 00:46
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Fri, 12 July 2019 09:44
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Fri, 12 July 2019 09:55
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Mon, 15 July 2019 06:15
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Mon, 15 July 2019 08:17
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Mon, 15 July 2019 17:16
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Mon, 15 July 2019 19:35
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Mon, 15 July 2019 20:18
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Tue, 16 July 2019 00:11
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Tue, 16 July 2019 02:11
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Tue, 16 July 2019 09:38
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Wed, 17 July 2019 18:44
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Wed, 17 July 2019 20:25
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Wed, 17 July 2019 23:04
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Wed, 17 July 2019 23:46
|
|
|
Re: CTRL + C = 659 Heap leaks
By: mirek on Tue, 23 July 2019 09:36
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Thu, 11 July 2019 10:28
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Thu, 11 July 2019 10:30
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Thu, 11 July 2019 22:13
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Thu, 11 July 2019 22:24
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Novo on Thu, 11 July 2019 22:31
|
|
|
Re: CTRL + C = 659 Heap leaks
By: Xemuth on Fri, 12 July 2019 09:28
|
Goto Forum:
Current Time: Thu Mar 28 10:36:46 CET 2024
Total time taken to generate the page: 0.01212 seconds
|