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: CONFIRMED
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-02-29 04:53 UTC (History)
3 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