News for hackers. Stuff that matters.
Re:Hunting down a C memory leak in a Go program by WalterBright on Friday October 15, 2021 @11:09PM (#28885232)
I once had to intercept every call malloc/free/realloc and log it to find a leak. I wound up turning that into an immensely useful tool.
Re:Hunting down a C memory leak in a Go program by WalterBright on Saturday October 16, 2021 @04:03AM (#28886302)
It would also stomp on all memory returned by malloc, and all memory that free free'd. This uncovered amazing numbers of bugs.

Over time, though, it got less and less effective, as I got better and better at avoiding writing such bugs in the first place.

Most bugs I create these days are due to misunderstanding the problem I'm solving, rather than memory misuse.

Re:Hunting down a C memory leak in a Go program by marivilla on Friday October 15, 2021 @11:43PM (#28885377)
If you are the same Walter Bright who invented the D programming language then this comment should win a fun comment award

also there should be an HN comments award show or something

Re:Hunting down a C memory leak in a Go program by vips7L on Saturday October 16, 2021 @02:27AM (#28885955)
The one and only Walter Bright.
Re:Hunting down a C memory leak in a Go program by WalterBright on Saturday October 16, 2021 @03:59AM (#28886291)
There can be only one.
Re:Hunting down a C memory leak in a Go program by lostmsu on Saturday October 16, 2021 @12:36AM (#28885583)
valgrind?
Re:Hunting down a C memory leak in a Go program by WalterBright on Saturday October 16, 2021 @04:53AM (#28886494)
I wish. Mine instrumented the source code, not the executable.
Re:Hunting down a C memory leak in a Go program by linkdd on Saturday October 16, 2021 @12:43AM (#28885608)
This was my first guess, but according to wikipedia[0], the author of valgrind is Julian Seward[1].

  [0] - https://en.wikipedia.org/wiki/Valgrind
  [1] - https://en.wikipedia.org/wiki/Julian_Seward
Re:Hunting down a C memory leak in a Go program by leeoniya on Saturday October 16, 2021 @12:50AM (#28885635)
Re:Hunting down a C memory leak in a Go program by lostmsu on Saturday October 16, 2021 @12:46AM (#28885620)
Maybe WalterBright is his pseudonym on HN?
Re:Hunting down a C memory leak in a Go program by FridgeSeal on Saturday October 16, 2021 @01:55AM (#28885864)
Fairly sure this is the Walter Bright that wrote the D language, a C++ compiler etc
Re:Hunting down a C memory leak in a Go program by WalterBright on Saturday October 16, 2021 @04:00AM (#28886294)
It was my evil twin. Of course, he claims the evil one is me. Don't listen to him!
Re:Hunting down a C memory leak in a Go program by WalterBright on Saturday October 16, 2021 @04:04AM (#28886305)
No, no, he's the bad one!