Thread (40 messages) 40 messages, 8 authors, 2017-10-10

Re: [PATCH] pkt-line: re-'static'-ify buffer in packet_write_fmt_1()

flat view

From: Stefan Beller <hidden>
Date: 2017-08-28 17:52:56

quoted
quoted
No mention of "pkt-line.c". Did you run Git with valgrind on one of
your repositories to find it?
I'm curious, too. I don't think the valgrind setup in our test suite is
great for finding leaks right now.
This discussion comes up every once in a while,
the last time I was involved in this discussion I proposed
to have an "optional_free(void *)", which only frees memory
in e.g. the developer build/debug build.

That way we can have a strict "no leaks in developer build"
policy (as it is easy to detect!), but it doesn't slow down the
widely distributed version of Git.

IIRC, then the discussion focused on "what if we misuse
optional_free and the real free", such that the widely distributed
version just leaks large amounts of memory and the developers
do not notice, but quite the opposite(!) the developers would feel
safe to ignore any memory complaints, because the developer build
is clean.

Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help