-
Notifications
You must be signed in to change notification settings - Fork 283
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
libasan detects leaks #364
Comments
Maybe I'm missing something, but libraries create resources which are expected to last until the program exits; |
Does libasan have a way to produce a long enough stack trace to tell you where to look to see why the memory was allocated? |
Hi John, thank you for your efforts. I did not know about this AddressSanitizer (libasan) but previously I used to run Valgrind again GNUstep applications to get similar information about our memory management. |
Thanks for saying all the stuff I ought to have said Fred. |
This can also come from libobjc2 if using GCC and legacy (assuming you are using libobjc2 and not gcc-objc):
Originally posted by @davidchisnall in gnustep/libobjc2#270 (comment) |
Hi!
We compile all binaries with the libasan, which detects several memory leaks:
Sample code:
Compile with:
gcc $(gnustep-config --objc-flags --gui-libs) -fsanitize=address -lgnustep-base -lobjc test.mm -o test
Error returned:
system:
Linux NAME 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux
(Note: I also posted the issue under: gnustep/libobjc2#270, since I do not know where the memory leak is caused.)
The text was updated successfully, but these errors were encountered: