Live data from Hacker News

OpenBSD: Malloc leak detection available in -current

undeadly.org

51–60 of 61 posts

Re: OpenBSD: Malloc leak detection available in -current

#51

Earlier quoted context omitted.

> There is no point in freeing blocks at the end of a program ...unless you are trying to find memory leaks in your program. In that case it would be very helpful if the program, and the libraries it uses, were written to actively free all allocated memory. > I think many GNU tools just never free any memory It is absolutely true that some GNU software (including libraries like glib) allocate memory that they never i…

To work around leaks, just don’t run your GNU programs for very long (:

Many GNU programs will helpfully terminate periodically with SIGSEGV to help prevent memory leaks from becoming a problem

Re: OpenBSD: Malloc leak detection available in -current

#52
post #10

To quota GNU libc manual: > There is no point in freeing blocks at the end of a program, because all of the program’s space is given back to the system when the process terminates. https://www.gnu.org/software/libc/manual/html_node/Freeing-a... I think many GNU tools just never free any memory. For example, GCC : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66339 -- edit: added GCC as example.

Well yeah if your program does something and then terminates then memory leaks are not an issue.

If your process is a server or a daemon or something then restarting each instance every N hours is a nice backstop but memory leaks are still a frightening spanner in the works!

Re: OpenBSD: Malloc leak detection available in -current

#53
post #43

Earlier quoted context omitted.

Theo de Raadt is the one who's wrong. When code goes closed source, you're locked out and can't have it at all anymore. When it goes GPL, you can still have it just by going GPL yourself.

> "When it goes GPL, you can still have it just by going GPL yourself." Which in some people's opinion, is no better. Just a different set of handcuffs.

“This is madness! He has lost his mind! This defies the first law of free trade. Rule zero came before this rule one. Freedom means you cannot dictate to anyone.” (emphasis mine)

https://www.openbsd.org/lyrics.html#43

Re: OpenBSD: Malloc leak detection available in -current

#54

Earlier quoted context omitted.

How does one "just link against the code in addr2line" ?

You rename them main symbol to something else then you just call it like any other library.

addr2line is unlikely to be a trivial self-contained program without dependencies.

Re: OpenBSD: Malloc leak detection available in -current

#55

Earlier quoted context omitted.

You rename them main symbol to something else then you just call it like any other library.

addr2line is unlikely to be a trivial self-contained program without dependencies.

Then link to those dependencies.

Re: OpenBSD: Malloc leak detection available in -current

#56

Earlier quoted context omitted.

addr2line is unlikely to be a trivial self-contained program without dependencies.

Then link to those dependencies.

Unnecessary. Most people's hands will be able to type up the required shell one-liner to do this.

Re: OpenBSD: Malloc leak detection available in -current

#57
post #7

This is great news to me, it is the one think I was hoping for. I use OpenBSD to test objects I create and testing there discovered issues that Linux and AIX happily ignored. But I used valgrind on Linux to look for leaks. With this I can now test for all "my issues" on OpenBSD :)

Could you share more about how nd why you use AIX? How is it in production? Im very interested in corp Unixes but have never met anyone still using one, alrhough new features keep getting added.

Re: OpenBSD: Malloc leak detection available in -current

#58
post #53
post #43

Earlier quoted context omitted.

> "When it goes GPL, you can still have it just by going GPL yourself." Which in some people's opinion, is no better. Just a different set of handcuffs.

“This is madness! He has lost his mind! This defies the first law of free trade. Rule zero came before this rule one. Freedom means you cannot dictate to anyone .” (emphasis mine) https://www.openbsd.org/lyrics.html#43

The story about RMS on the airplane is just an ad hominem and has nothing to do with his opinions on software freedom.

> Some of the software which is fetched and compiled is not as free as we would like, but what can we do.

They could choose to not put such software in their ports tree.

> Meanwhile, Richard has personally made sure that all the official GNU software — including Emacs — compiles and runs on Windows.

There's a big difference between making free software support a non-free system and distributing non-free software.

> Rule 1: You cannot sell your code! Rule 2: You must give it only to me

Straw man. The GPL doesn't have anything even resembling either of those rules.

> You cannot give your code away

This is clearly completely absurd and not required by any free license.

Re: OpenBSD: Malloc leak detection available in -current

#59
post #53

Earlier quoted context omitted.

“This is madness! He has lost his mind! This defies the first law of free trade. Rule zero came before this rule one. Freedom means you cannot dictate to anyone .” (emphasis mine) https://www.openbsd.org/lyrics.html#43

The story about RMS on the airplane is just an ad hominem and has nothing to do with his opinions on software freedom. > Some of the software which is fetched and compiled is not as free as we would like, but what can we do. They could choose to not put such software in their ports tree. > Meanwhile, Richard has personally made sure that all the official GNU software — including Emacs — compiles and runs on Windows.…

I provided a reference for a portion of lyrics that fairly elegantly summarised the BSD position on freedom – that is it. Besides, it is a song and obviously it will take artistic liberties compared to an essay.

If you want to argue minutia related to things on that page other than the tiny lyric snippet, it is probably better that you send an e-mail to misc@.

Re: OpenBSD: Malloc leak detection available in -current

#60
post #40

Earlier quoted context omitted.

OpenBSD begrudgingly made an exception for LLVM/Clang, after vocal opposition to the re-licencing. It currently uses LLVM/Clang 13 and has been making progress towards 15. Licensing is not the problem here. Most of the sanitizers are simply not enabled in the version shipped in base, and require runtime libraries that have not been ported to OpenBSD. Valgrind exists in ports, but it is ancient and broken. It does not…

> OpenBSD begrudgingly made an exception for LLVM/Clang […] Licensing is not the problem here If it isn’t a problem, why do you say “begrudgingly”? I think they are pragmatic but also do find it a problem. Why else would they say “source code published under version 2 of the Apache license is subject to additional restrictions and cannot be included into OpenBSD” ?

I didn't say it wasn't a problem. I said it was not the problem here. Important distinction.

Licensing is not the reason for the sanitizers not being enabled in the default build, a lot of stuff isn't. If it were supported, it would probably be delegated to the ports version, along with the analyzer, additional llvm tools, cross-compiling, etc.

Post reply on HN