<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-bitmap.c, branch v2.4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-06-05T19:00:22Z</updated>
<entry>
<title>Merge branch 'rs/plug-leak-in-pack-bitmaps' into maint</title>
<updated>2015-06-05T19:00:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-05T19:00:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06629901444888e5fa491c5f5f24ff03686af9a9'/>
<id>urn:sha1:06629901444888e5fa491c5f5f24ff03686af9a9</id>
<content type='text'>
The code to read pack-bitmap wanted to allocate a few hundred
pointers to a structure, but by mistake allocated and leaked memory
enough to hold that many actual structures.  Correct the allocation
size and also have it on stack, as it is small enough.

* rs/plug-leak-in-pack-bitmaps:
  pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps
</content>
</entry>
<entry>
<title>pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps</title>
<updated>2015-05-19T16:31:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2015-05-18T23:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=599dc766e89fe4f964c197f8d109dfc2e3c890ba'/>
<id>urn:sha1:599dc766e89fe4f964c197f8d109dfc2e3c890ba</id>
<content type='text'>
Use an automatic variable for recent_bitmaps, an array of pointers.
This way we don't allocate too much and don't have to free the memory
at the end.  The old code over-allocated because it reserved enough
memory to store all of the structs it is only pointing to and never
freed it.  160 64-bit pointers take up 1280 bytes, which is not too
much to be placed on the stack.

MAX_XOR_OFFSET is turned into a preprocessor constant to make it
constant enough for use in an non-variable array declaration.

Noticed-by: Stefan Beller &lt;stefanbeller@gmail.com&gt;
Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/test-bitmap-free-at-end' into maint</title>
<updated>2015-05-13T21:05:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-13T21:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=071e93a14844f474d313eec1a035816192616889'/>
<id>urn:sha1:071e93a14844f474d313eec1a035816192616889</id>
<content type='text'>
* sb/test-bitmap-free-at-end:
  pack-bitmap.c: fix a memleak
</content>
</entry>
<entry>
<title>pack-bitmap.c: fix a memleak</title>
<updated>2015-04-13T04:45:27Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-03-31T01:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f86a3747abc742359397e3050b1fbef297415de5'/>
<id>urn:sha1:f86a3747abc742359397e3050b1fbef297415de5</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/unused-symbols'</title>
<updated>2015-02-11T21:44:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c985aaf87909ab7f8194b3cfed3a744cbff78fe9'/>
<id>urn:sha1:c985aaf87909ab7f8194b3cfed3a744cbff78fe9</id>
<content type='text'>
Mark file-local symbols as "static", and drop functions that nobody
uses.

* jc/unused-symbols:
  shallow.c: make check_shallow_file_for_update() static
  remote.c: make clear_cas_option() static
  urlmatch.c: make match_urls() static
  revision.c: make save_parents() and free_saved_parents() static
  line-log.c: make line_log_data_init() static
  pack-bitmap.c: make pack_bitmap_filename() static
  prompt.c: remove git_getpass() nobody uses
  http.c: make finish_active_slot() and handle_curl_result() static
</content>
</entry>
<entry>
<title>Merge branch 'ak/typofixes'</title>
<updated>2015-02-11T21:37:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:37:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14f563031d21a26aa28a08f795c6d2c36580a7bf'/>
<id>urn:sha1:14f563031d21a26aa28a08f795c6d2c36580a7bf</id>
<content type='text'>
* ak/typofixes:
  t/lib-terminal.sh: fix typo
  pack-bitmap: fix typo
</content>
</entry>
<entry>
<title>pack-bitmap: fix typo</title>
<updated>2015-01-21T20:40:05Z</updated>
<author>
<name>Alexander Kuleshov</name>
<email>kuleshovmail@gmail.com</email>
</author>
<published>2015-01-21T09:13:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25143a54fcc14273ed03b0cb77b6187f20d6069d'/>
<id>urn:sha1:25143a54fcc14273ed03b0cb77b6187f20d6069d</id>
<content type='text'>
Signed-off-by: Alexander Kuleshov &lt;kuleshovmail@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-bitmap.c: make pack_bitmap_filename() static</title>
<updated>2015-01-15T19:04:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T23:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb4680500a3e72e0d5811659f9e4f46c8df91696'/>
<id>urn:sha1:cb4680500a3e72e0d5811659f9e4f46c8df91696</id>
<content type='text'>
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/pack-bitmap'</title>
<updated>2014-12-12T22:31:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-12T22:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3889e7a60c65031f0c5381d8060cefb4294d932e'/>
<id>urn:sha1:3889e7a60c65031f0c5381d8060cefb4294d932e</id>
<content type='text'>
* jk/pack-bitmap:
  pack-bitmap: do not use gcc packed attribute
</content>
</entry>
<entry>
<title>pack-bitmap: do not use gcc packed attribute</title>
<updated>2014-12-01T02:07:34Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2014-11-27T05:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5007211b6582fc38647ff695b5ac51541ea9de8'/>
<id>urn:sha1:b5007211b6582fc38647ff695b5ac51541ea9de8</id>
<content type='text'>
The "__attribute__" flag may be a noop on some compilers.
That's OK as long as the code is correct without the
attribute, but in this case it is not. We would typically
end up with a struct that is 2 bytes too long due to struct
padding, breaking both reading and writing of bitmaps.

Instead of marshalling the data in a struct, let's just
provide helpers for reading and writing the appropriate
types. Besides being correct on all platforms, the result is
more efficient and simpler to read.

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
