<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/unix, 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>util: don't include unnecessary system libraries</title>
<updated>2021-11-22T14:27:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-19T14:36:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=fc42c28ebe8bd4b524cc0f1594395a04b7d8e796'/>
<id>fc42c28ebe8bd4b524cc0f1594395a04b7d8e796</id>
<content type='text'>
Remove some unnecessary includes from utility code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove some unnecessary includes from utility code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support build with NO_MMAP to disable use of system mmap</title>
<updated>2020-12-30T14:55:40+00:00</updated>
<author>
<name>Dhruva Krishnamurthy</name>
<email>dhruvakm@gmail.com</email>
</author>
<published>2020-06-17T21:31:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=4ce8e01a7ada3c75f7407dc9fafd25b4ac38d037'/>
<id>4ce8e01a7ada3c75f7407dc9fafd25b4ac38d037</id>
<content type='text'>
    * Use pread/pwrite to avoid updating position in file descriptor
    * Emulate missing pread/pwrite on win32 using overlapped file IO
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    * Use pread/pwrite to avoid updating position in file descriptor
    * Emulate missing pread/pwrite on win32 using overlapped file IO
</pre>
</div>
</content>
</entry>
<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>win32: use GIT_ASSERT</title>
<updated>2020-11-27T11:09:21+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-11-22T09:43:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c6ebdb296bc44b50fa76e492f57f086bf6c9ec08'/>
<id>c6ebdb296bc44b50fa76e492f57f086bf6c9ec08</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>init: move thread init to git_global_threads_init</title>
<updated>2020-10-11T13:42:19+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-12T12:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=fe12423a91015e6116773340a8936fece3251339'/>
<id>fe12423a91015e6116773340a8936fece3251339</id>
<content type='text'>
Instead of treating win32 thread initialization specially in the win32
git_libgit2_init function, add a git_global_threads_init function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of treating win32 thread initialization specially in the win32
git_libgit2_init function, add a git_global_threads_init function.
</pre>
</div>
</content>
</entry>
<entry>
<title>p_chmod: Android compatibility</title>
<updated>2020-10-04T17:46:36+00:00</updated>
<author>
<name>kevinlul</name>
<email>6320810+kevinlul@users.noreply.github.com</email>
</author>
<published>2020-07-08T02:29:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e8ab3db99e13bcb330e91e0ca0265b60483a5e47'/>
<id>e8ab3db99e13bcb330e91e0ca0265b60483a5e47</id>
<content type='text'>
Fix #5565

Pre-Android 5 did not implement a virtual filesystem atop FAT partitions for Unix permissions, which causes chmod to fail. However, Unix permissions have no effect on Android anyway as file permissions are not actually managed this way, so treating it as a no-op across all Android is safe.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix #5565

Pre-Android 5 did not implement a virtual filesystem atop FAT partitions for Unix permissions, which causes chmod to fail. However, Unix permissions have no effect on Android anyway as file permissions are not actually managed this way, so treating it as a no-op across all Android is safe.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo on GIT_USE_NEC</title>
<updated>2020-02-20T19:47:22+00:00</updated>
<author>
<name>Sven Strickroth</name>
<email>email@cs-ware.de</email>
</author>
<published>2020-02-20T19:47:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ff46c5d316ef9930de5b88bc7c1a28ac41c75072'/>
<id>ff46c5d316ef9930de5b88bc7c1a28ac41c75072</id>
<content type='text'>
Signed-off-by: Sven Strickroth &lt;email@cs-ware.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sven Strickroth &lt;email@cs-ware.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>internal: use off64_t instead of git_off_t</title>
<updated>2019-11-25T02:18:29+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-06-23T17:13:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=6460e8abcfda7692af9bd267bddf6e11a78f8130'/>
<id>6460e8abcfda7692af9bd267bddf6e11a78f8130</id>
<content type='text'>
Prefer `off64_t` internally.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prefer `off64_t` internally.
</pre>
</div>
</content>
</entry>
<entry>
<title>unix: posix: avoid use of variadic macro `p_snprintf`</title>
<updated>2019-08-01T09:57:36+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-06-16T09:25:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1721ab047da75562c6f0e5c72af6c3e0d6b7e7e5'/>
<id>1721ab047da75562c6f0e5c72af6c3e0d6b7e7e5</id>
<content type='text'>
The macro `p_snprintf` is implemented as a variadic macro that
calls `snprintf` directly with `__VA_ARGS__`. In C89, variadic
macros are not allowed, but as the arguments of `p_snprintf` and
`snprintf` are matching 1:1, we can fix this by simply removing
the parameter list from `p_snprintf`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro `p_snprintf` is implemented as a variadic macro that
calls `snprintf` directly with `__VA_ARGS__`. In C89, variadic
macros are not allowed, but as the arguments of `p_snprintf` and
`snprintf` are matching 1:1, we can fix this by simply removing
the parameter list from `p_snprintf`.
</pre>
</div>
</content>
</entry>
<entry>
<title>regexec: prefix all regexec function calls with p_</title>
<updated>2019-05-19T10:10:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-12T23:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=02683b20c0775dab28d72727cc97a96ec77cb20c'/>
<id>02683b20c0775dab28d72727cc97a96ec77cb20c</id>
<content type='text'>
Prefix all the calls to the the regexec family of functions with `p_`.
This allows us to swap out all the regular expression functions with our
own implementation.  Move the declarations to `posix_regex.h` for
simpler inclusion.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prefix all the calls to the the regexec family of functions with `p_`.
This allows us to swap out all the regular expression functions with our
own implementation.  Move the declarations to `posix_regex.h` for
simpler inclusion.
</pre>
</div>
</content>
</entry>
</feed>
