<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch ethomson/threads</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>threads::iterator: use separate repository objects</title>
<updated>2018-08-19T11:57:29+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-08-19T11:57:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2afd01857d2f589c694a247072dbce01528edad8'/>
<id>2afd01857d2f589c694a247072dbce01528edad8</id>
<content type='text'>
Our thread policies state that we cannot re-use the `git_repository`
across threads.  Our tests cannot deviate from that.

Courtesy of Ximin Luo, https://github.com/infinity0:

https://github.com/libgit2/libgit2/issues/4753#issuecomment-412247757
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our thread policies state that we cannot re-use the `git_repository`
across threads.  Our tests cannot deviate from that.

Courtesy of Ximin Luo, https://github.com/infinity0:

https://github.com/libgit2/libgit2/issues/4753#issuecomment-412247757
</pre>
</div>
</content>
</entry>
<entry>
<title>threads::diff: use separate git_repository objects</title>
<updated>2018-08-05T10:01:14+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-08-05T10:01:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d1919485a5541fb3171d6fa835c7c0de41243dea'/>
<id>d1919485a5541fb3171d6fa835c7c0de41243dea</id>
<content type='text'>
Our thread policies state that we cannot re-use the `git_repository`
across threads.  Our tests cannot deviate from that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our thread policies state that we cannot re-use the `git_repository`
across threads.  Our tests cannot deviate from that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4728 from pks-t/pks/fuzzers</title>
<updated>2018-08-03T09:13:10+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-08-03T09:13:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=64138b70e10b9812af8f944e83747aa51da9a920'/>
<id>64138b70e10b9812af8f944e83747aa51da9a920</id>
<content type='text'>
Fuzzers</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fuzzers</pre>
</div>
</content>
</entry>
<entry>
<title>ci: fix location of fuzzer corpora on VSTS</title>
<updated>2018-08-03T08:01:59+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-08-03T08:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=835d60432082b87984211b60ab82791c01011b1b'/>
<id>835d60432082b87984211b60ab82791c01011b1b</id>
<content type='text'>
When using VSTS-based builds, we are in a different location than when
doing Travis builds. Due to this, the relative path to our fuzzer
corpora does not work on VSTS. Fix it by using `${SOURCE_DIR}` instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using VSTS-based builds, we are in a different location than when
doing Travis builds. Due to this, the relative path to our fuzzer
corpora does not work on VSTS. Fix it by using `${SOURCE_DIR}` instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzers: limit maximum pack object count</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-26T13:41:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e38ddc90bf2b77fce422014f2785a9124d21263f'/>
<id>e38ddc90bf2b77fce422014f2785a9124d21263f</id>
<content type='text'>
By default, libgit2 allows up to 2^32 objects when downloading a
packfile from a remote. For each of these objects, libgit2 will allocate
up to two small structs, which in total adds up to quite a lot of
memory. As a result, our fuzzers might run out of memory rather quick in
case where they receive as input a packfile with such a huge count of
objects.

Limit the packfile object count to 10M objects. This is sufficiently big
to still work with most largish repos (linux.git has around 6M objects
as of now), but small enough to not cause the fuzzer to OOM.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By default, libgit2 allows up to 2^32 objects when downloading a
packfile from a remote. For each of these objects, libgit2 will allocate
up to two small structs, which in total adds up to quite a lot of
memory. As a result, our fuzzers might run out of memory rather quick in
case where they receive as input a packfile with such a huge count of
objects.

Limit the packfile object count to 10M objects. This is sufficiently big
to still work with most largish repos (linux.git has around 6M objects
as of now), but small enough to not cause the fuzzer to OOM.
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzers: convert download_refs fuzzer to C</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-19T12:52:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5db64e2f1b05df6620c99073a7798f9f4feabd09'/>
<id>5db64e2f1b05df6620c99073a7798f9f4feabd09</id>
<content type='text'>
Convert the "download_refs" fuzzer from C++ to C. Rename the source file
to have it be picked up by our build system.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the "download_refs" fuzzer from C++ to C. Rename the source file
to have it be picked up by our build system.
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzers: import download_refs fuzzer from oss-fuzz</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-19T12:21:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=730c0edb5086ef80ae05c88be735e3d509bd262d'/>
<id>730c0edb5086ef80ae05c88be735e3d509bd262d</id>
<content type='text'>
This is a direct copy of the code from google/oss-fuzz, written by
Nelson Elhage (@nelhage). Note that due to the ".cc" ending, the file
will not yet be picked up by the build system. This is intended, as
currently that file is partly written in C++, requiring a conversion to
C.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a direct copy of the code from google/oss-fuzz, written by
Nelson Elhage (@nelhage). Note that due to the ".cc" ending, the file
will not yet be picked up by the build system. This is intended, as
currently that file is partly written in C++, requiring a conversion to
C.
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzers: avoid use of libgit2 internals in packfile_raw</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-20T09:07:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=de53972f65d3dc58f319f9c3a69af6543225a4a0'/>
<id>de53972f65d3dc58f319f9c3a69af6543225a4a0</id>
<content type='text'>
The packfile_raw fuzzer is using some internal APIs from libgit2, which
makes it hard to compile it as part of the oss-fuzz project. As oss-fuzz
requires us to link against the C++ FuzzingEngine library, we cannot use
"-DBUILD_FUZZERS=ON" directly but instead have to first compile an
object from our fuzzers and then link against the C++ library. Compiling
the fuzzer objects thus requires an external invocation of CC, and we
certainly don't want to do further black magic by adding libgit2's
private source directory to the header include path.

To fix the issue, convert the code to not use any internal APIs. Besides
some headers which we have to add now, this also requires us to change
to the hashing function of the ODB. Note that this will change the
hashing result, as we have previously not prepended the object header to
the data that is to be hashed. But this shouldn't matter in practice, as
we don't care for the hash value anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The packfile_raw fuzzer is using some internal APIs from libgit2, which
makes it hard to compile it as part of the oss-fuzz project. As oss-fuzz
requires us to link against the C++ FuzzingEngine library, we cannot use
"-DBUILD_FUZZERS=ON" directly but instead have to first compile an
object from our fuzzers and then link against the C++ library. Compiling
the fuzzer objects thus requires an external invocation of CC, and we
certainly don't want to do further black magic by adding libgit2's
private source directory to the header include path.

To fix the issue, convert the code to not use any internal APIs. Besides
some headers which we have to add now, this also requires us to change
to the hashing function of the ODB. Note that this will change the
hashing result, as we have previously not prepended the object header to
the data that is to be hashed. But this shouldn't matter in practice, as
we don't care for the hash value anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>cmake: remove USE_SANITIZER and USE_COVERAGE options</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-20T10:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=12804c4600d3aef879ac09b50563f9bf1efea540'/>
<id>12804c4600d3aef879ac09b50563f9bf1efea540</id>
<content type='text'>
Both the USE_SANITIZER and USE_COVERAGE options are convenience options
that turn on a set of CFLAGS. Despite our own set of CFLAGS required to
build libgit2, we have no real business to mess with them, though, as
they can easily be passed in by the user via specifying the CFLAGS
environment variable. The reasoning behind not providing them is that as
soon as we start adding those for some usecases, users might ask for
other sets of CFLAGS catering to their specific need in another usecase.
Thus, we do not want to support them here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both the USE_SANITIZER and USE_COVERAGE options are convenience options
that turn on a set of CFLAGS. Despite our own set of CFLAGS required to
build libgit2, we have no real business to mess with them, though, as
they can easily be passed in by the user via specifying the CFLAGS
environment variable. The reasoning behind not providing them is that as
soon as we start adding those for some usecases, users might ask for
other sets of CFLAGS catering to their specific need in another usecase.
Thus, we do not want to support them here.
</pre>
</div>
</content>
</entry>
<entry>
<title>cmake: fix the unholy options alignment mess</title>
<updated>2018-08-03T07:50:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-20T10:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ad0cb297bd867882e6d84bd9e556d237b43647d8'/>
<id>ad0cb297bd867882e6d84bd9e556d237b43647d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
