Bug 1626587 - zlib patches, 1.11.2 → 1.11.5 breaks libgit2 as used by pygit2 on aarch64
Summary: zlib patches, 1.11.2 → 1.11.5 breaks libgit2 as used by pygit2 on aarch64
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libgit2
Version: 29
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeremy Linton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2018-09-07 17:04 UTC by Jeremy Linton
Modified: 2018-10-07 20:58 UTC (History)
10 users (show)

(edit)
Clone Of: 1614720
(edit)
Last Closed: 2018-10-07 20:58:00 UTC


Attachments (Terms of Use)

Description Jeremy Linton 2018-09-07 17:04:39 UTC
+++ This bug was initially created as a clone of Bug #1614720 +++

(with the ppc & noise bits trimmed)

https://apps.fedoraproject.org/koschei/build/4807194

https://github.com/libgit2/pygit2/issues/811
https://github.com/libgit2/pygit2/issues/812

One of errors is that it gets some 'U' character and this happens only on aarc64. Second error makes some option to not pass correctly into libgit2 C code (because same test in C works fine).

--- Additional comment from Igor Gnatenko on 2018-08-10 06:17:18 EDT ---

# aarch64

======================================================================
FAIL: test_get_gpg_signature_when_signed (test.test_commit.GpgSignatureTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pygit2-0.27.1/test/test_commit.py", line 191, in test_get_gpg_signature_when_signed
    assert payload == expected_payload
AssertionError
----------------------------------------------------------------------
--- Additional comment from Igor Gnatenko on 2018-08-10 06:20:03 EDT ---

Unfortunately that doesn't help but quick analyses gives something like:

# aarch64

        expected_payload = (
            'tree c36c20831e43e5984c672a714661870b67ab1d95\nauthor Mark Adams '
            '<madams@atlassian.com> 1517510299 -0600\ncommitter Mark Adams <ma'
            'dams@atlassian.com> 1517510441 -0600\n\nMaking a GPG signed commi'
            't\n'
        ).encode('ascii')

But the payload, pygit2 gives contains extra 'U' at the end of this line.


--- Additional comment from Peter Robinson on 2018-08-10 06:33:54 EDT ---

jlinton: can you possibly take a look at this please?

--- Additional comment from Jan Kurik on 2018-08-14 04:37:28 EDT ---

This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

--- Additional comment from Jeremy Linton on 2018-09-06 17:33:55 EDT ---

On aarch64 its definitly the optimization patch, and this problem is similar to the one in git itself. Basically the buffer is being allocated with calloc(), and zlib is poisoning unused portions of the buffer. A small tweak to force a null termination at the end of the buffer in packfile_unpack_compressed()

	obj->type = type;
	obj->len = size;
	obj->data = buffer;
	if (buf_size>size)
	{
		buffer[size]='\0';
	}
	return 0;

fixes the problem.

Comment 1 Fedora Update System 2018-09-18 21:32:19 UTC
zlib-1.2.11-13.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 2 Fedora Update System 2018-09-20 16:17:04 UTC
zlib-1.2.11-13.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 3 Fedora Update System 2018-10-02 11:32:20 UTC
zlib-1.2.11-14.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 4 Fedora Update System 2018-10-02 21:18:16 UTC
zlib-1.2.11-14.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 5 Fedora Update System 2018-10-07 20:58:00 UTC
zlib-1.2.11-14.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.