Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924191 - media-libs/exempi: unaligned access causes dev-python/python-xmp-toolkit-2.0.2 to fails tests on sparc (test_file_to_dict (test.test_core_unit.UtilsTestCase.test_file_to_dict) ... Bus error)
Summary: media-libs/exempi: unaligned access causes dev-python/python-xmp-toolkit-2.0....
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://gitlab.freedesktop.org/libope...
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access 922855
  Show dependency tree
 
Reported: 2024-02-09 22:55 UTC by matoro
Modified: 2024-06-05 16:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_924191.txt,19.78 KB, text/plain)
2024-02-09 22:56 UTC, matoro
Details
gdb context and complete backtrace (file_924191.txt,246.92 KB, text/plain)
2024-02-09 23:41 UTC, matoro
Details
UBSAN run (file_924191.txt,1.91 KB, text/plain)
2024-02-09 23:59 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-02-09 22:55:27 UTC
Unaligned crash on this test.  Not a regression.

python3.11 -m unittest_or_fail discover -v
test_delete_property (test.test_core_unit.NegativeTestCases.test_delete_property)
Verify the deleting a phony property does not raise an exception. ... ok
test_delete_property_bad_schema (test.test_core_unit.NegativeTestCases.test_delete_property_bad_schema)
Specifying a bad schema trigger an exception. ... Unregistered schema namespace URI
ok
test_2bytes_codepoint (test.test_core_unit.UnicodeTestCase.test_2bytes_codepoint)
Verify that we can create and read back utf-8 where some characters ... ok
test_get_localized_text (test.test_core_unit.UnicodeTestCase.test_get_localized_text)
Verify that unicode string literals are properly interpreted. ... ok
test_libxmp_version (test.test_core_unit.UnicodeTestCase.test_libxmp_version)
Verify that the version attribute is accessible. ... ok
test_parse_from_str_3_bytes_per_codepoint (test.test_core_unit.UnicodeTestCase.test_parse_from_str_3_bytes_per_codepoint)
Verify that we can create and read back utf-8 where each character ... ok
test_xmpmeta_repr (test.test_core_unit.UnicodeTestCase.test_xmpmeta_repr)
Should be a str in both 2.x and 3.x ... ok
test_xmpmeta_str (test.test_core_unit.UnicodeTestCase.test_xmpmeta_str)
In 2.7, str must return a byte string.  In 3.x, it is a str. ... ok
test_xmpmeta_unicode_27 (test.test_core_unit.UnicodeTestCase.test_xmpmeta_unicode_27)
In 2.7, unicode(xmp) should return a unicode object. ... ok
test_file_to_dict (test.test_core_unit.UtilsTestCase.test_file_to_dict) ... /var/tmp/portage/dev-python/python-xmp-toolkit-2.0.2/temp/environment: line 2577:    87 Bus error               "${@}"

Reproducible: Always
Comment 1 matoro archtester 2024-02-09 22:56:34 UTC
Created attachment 884643 [details]
build.log and emerge --info
Comment 2 matoro archtester 2024-02-09 23:41:59 UTC
Created attachment 884644 [details]
gdb context and complete backtrace

Culprit code is actually in media-libs/exempi.  In fact they have aligned/unaligned routines, but the aligned ones are gated behind a check for Solaris, rather than a generic sparc check.

This is wrong as unaligned access is UB on all platforms.
Comment 3 matoro archtester 2024-02-09 23:59:52 UTC
Created attachment 884645 [details]
UBSAN run
Comment 4 matoro archtester 2024-02-10 03:43:08 UTC
Have opened an upstream PR to fix this https://gitlab.freedesktop.org/libopenraw/exempi/-/merge_requests/8
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-05 16:05:56 UTC
Will dekeyword it.
Comment 6 Larry the Git Cow gentoo-dev 2024-06-05 16:13:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42c8de509fad0101dec2446d51000bcc9d1ba6c1

commit 42c8de509fad0101dec2446d51000bcc9d1ba6c1
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-06-05 16:10:19 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-06-05 16:10:46 +0000

    media-libs/exempi: Dekeyword on big endian arches
    
    Remove keywords for big endian architectures, the package is broken
    on big endian architectures according to upstream.  We did not notice
    this before because of insufficient test coverage.
    
    Bug: https://bugs.gentoo.org/924191
    See-Also: https://gitlab.freedesktop.org/libopenraw/exempi/-/merge_requests/8#note_2277243
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 media-libs/exempi/exempi-2.6.2.ebuild    | 2 +-
 media-libs/exempi/exempi-2.6.3-r1.ebuild | 2 +-
 media-libs/exempi/exempi-2.6.3.ebuild    | 2 +-
 media-libs/exempi/exempi-2.6.4.ebuild    | 2 +-
 media-libs/exempi/exempi-2.6.5.ebuild    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)