Skip to content

Merge in upstream 1.8.4 #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 814 commits into
base: main
Choose a base branch
from
Open

Merge in upstream 1.8.4 #44

wants to merge 814 commits into from

Conversation

cmbartschat
Copy link

No description provided.

ethomson and others added 30 commits December 21, 2023 20:25
git_diff_find_similar doesn't always remove unmodified deltas
ntlmclient: update to latest upstream ntlmclient
httpclient: clear client->parser.data after use
Let's use the latest & greatest for building our sanitizer / fuzzing
builds.
Using modern rsa (sha2-256 or sha2-512) with libssh2 is complicated and
depends on numerous factors for support. Just use ecdsa, which is
supported by both libssh2 v1.11.0 and modern OpenSSH (which we use for
our server in CI).
…n-push-example

Support authentication in push example
Emulating `git commit` is clunky - identifying your commit's parents is
part of the problem. Provide a helper to give you the parents given the
current repository state.
There's been drift in our nightly builds vs our main builds.
Unfortunately, sharing steps remains clunky with our matrix-heavy setup.
So this remains copy-pasta.
When we update the build container, actually do a push. Remove the
broken build-containers.yml step and just do it in the workflow.
Also fix indentation
Benchmarks: add a site to view results
Keep the `git_str` buf that prevents unnecessary small allocations, and
simplify the comparisons compared to what was there previously.
Provide a helper method to provide the HEAD's commit, much like our
existing `head_tree` helper.
commit functions should take an array of const pointers, not a const
array.
ethomson and others added 30 commits May 13, 2024 09:58
examples: fix memory leak in for-each-ref.c
Promote mode to `uint32_t` before comparing it to an `uint16_t` to avoid
mixed signed comparison warnings.
Avoid sloppy aliasing in our (re-)allocation, which is undefined
behavior. This has been problematic before and was helped by `volatile`
(see b62a6a1) but that is not
technically correct, and some compilers / architectures do not
understand that `ptr` is changing due to its aliasing.

Just make `git_array_alloc` behave like `realloc`, taking a `void *` and
returning a `void *`.
rand: avoid uninitialized loadavg warnings
cli: include alloca on illumos / solaris / sunos
Update git_array allocator to obey strict aliasing rules
…ness

tree: avoid mixed signedness comparison
Instead of tweaking the `stdalloc` allocator when
`GIT_DEBUG_STRICT_ALLOC` is defined, actually create a debugging
allocator. This allows us to ensure that we are strict about things like
not expecting `malloc(0)` to do something useful, but we can also
introduce an excessively pedantic `realloc` implementation that _always_
creates a new buffer, throws away its original `ptr`, and overwrites the
data that's there with garbage. This may be helpful to identify places
that make assumptions about realloc.
realpath(3) _may_ allocate strings (if the second param is NULL) using
the system allocator. However, callers need an assurance that they can
free memory using git__free. If we made realpath do an allocation, then
make sure that we strdup it into our allocator's memory.

More importantly, avoid this behavior by always providing a buffer to
p_realpath invocations.
Instead of setting the allocator to stdalloc, just pass `NULL`, in case
we're running with the debug allocator.
Introduce a stricter debugging allocator for testing
Description: In an older version of libgit2 in git_object_lookup_prefix was a check that repo is valid, but now there is repo->oid_type in the git_object_lookup and must be checked as well
Fixes a bug likely introduced in
d396819 (in 1.8.1) whereby
‘proxy_settings.on_status’ would be left uninitialized when using the
‘http-parser’ backend, eventually leading to a segfault in
‘http_parser_execute’.  Valgrind would report use of the uninitialized
value like so:

   Conditional jump or move depends on uninitialised value(s)
      at 0x50CD533: http_parser_execute (http_parser.c:910)
      by 0x4928504: git_http_parser_execute (httpparser.c:82)
      by 0x4925C42: client_read_and_parse (httpclient.c:1178)
      by 0x4926F27: git_http_client_read_response (httpclient.c:1458)
      by 0x49255FE: http_stream_read (http.c:427)
      by 0x4929B90: git_smart__recv (smart.c:29)
      by 0x492C147: git_smart__store_refs (smart_protocol.c:58)
      by 0x4929F6C: git_smart__connect (smart.c:171)
      by 0x4904DCE: git_remote_connect_ext (remote.c:963)
      by 0x48A15D2: clone_into (clone.c:449)
      by 0x48A15D2: git__clone (clone.c:546)
      by 0x4010E9: main (libgit2-proxy.c:20)
This reverts commit cf19ddc, which
was breaking for several projects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.