<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/script/thread-sanitizer.supp, branch ethomson/test_https</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Make the pack and mwindow implementations data-race-free</title>
<updated>2020-11-29T03:40:56+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-08-02T01:24:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=322c15ee858622f2e3def514d3e7e1b47023950e'/>
<id>322c15ee858622f2e3def514d3e7e1b47023950e</id>
<content type='text'>
This change fixes a packfile heap corruption that can happen when
interacting with multiple packfiles concurrently across multiple
threads. This is exacerbated by setting a lower mwindow open file limit.

This change:

* Renames most of the internal methods in pack.c to clearly indicate
  that they expect to be called with a certain lock held, making
  reasoning about the state of locks a bit easier.
* Splits the `git_pack_file` lock in two: the one in `git_pack_file`
  only protects the `index_map`. The protection to `git_mwindow_file` is
  now in that struct.
* Explicitly checks for freshness of the `git_pack_file` in
  `git_packfile_unpack_header`: this allows the mwindow implementation
  to close files whenever there is enough cache pressure, and
  `git_packfile_unpack_header` will reopen the packfile if needed.
* After a call to `p_munmap()`, the `data` and `len` fields are poisoned
  with `NULL` to make use-after-frees more evident and crash rather than
  being open to the possibility of heap corruption.
* Adds a test case to prevent this from regressing in the future.

Fixes: #5591
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change fixes a packfile heap corruption that can happen when
interacting with multiple packfiles concurrently across multiple
threads. This is exacerbated by setting a lower mwindow open file limit.

This change:

* Renames most of the internal methods in pack.c to clearly indicate
  that they expect to be called with a certain lock held, making
  reasoning about the state of locks a bit easier.
* Splits the `git_pack_file` lock in two: the one in `git_pack_file`
  only protects the `index_map`. The protection to `git_mwindow_file` is
  now in that struct.
* Explicitly checks for freshness of the `git_pack_file` in
  `git_packfile_unpack_header`: this allows the mwindow implementation
  to close files whenever there is enough cache pressure, and
  `git_packfile_unpack_header` will reopen the packfile if needed.
* After a call to `p_munmap()`, the `data` and `len` fields are poisoned
  with `NULL` to make use-after-frees more evident and crash rather than
  being open to the possibility of heap corruption.
* Adds a test case to prevent this from regressing in the future.

Fixes: #5591
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the odb race-free</title>
<updated>2020-11-28T23:12:14+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-08-02T23:26:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=4ae41f9c639d246d34dac89c3f1d9451c9cfa8d3'/>
<id>4ae41f9c639d246d34dac89c3f1d9451c9cfa8d3</id>
<content type='text'>
This change adds all the necessary locking to the odb to avoid races in
the backends.

Part of: #5592
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds all the necessary locking to the odb to avoid races in
the backends.

Part of: #5592
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a ThreadSanitizer build</title>
<updated>2020-08-03T16:37:32+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-08-03T14:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=896b1db493245f5ecbbb328b4d1485e44d4a1e27'/>
<id>896b1db493245f5ecbbb328b4d1485e44d4a1e27</id>
<content type='text'>
This change adds a ThreadSanitizer CI build rule. It's informative for
now because there are still known places where there are races.

Part of: #5592
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds a ThreadSanitizer CI build rule. It's informative for
now because there are still known places where there are races.

Part of: #5592
</pre>
</div>
</content>
</entry>
</feed>
