Created attachment 71250 [details] Patch to fix issue with hwdb on MSB platforms I recently upgraded to udev-196-r1 (systemd-196) on Gentoo Linux on SPARC, and observed (with USE=hwdb and the database created) systemd-udevd and udevadm to be causing segfaults. Further investigation (tested on PowerPC) and some debugging reveals this to be an endianness issue. The attached patch appears to correct the issue, but may not be the most elegant fix. Note that node->values_count is also referenced at libudev-hwdb.c:239, though in my testing was not reached. It may be similarly affected.
Created attachment 71251 [details] [review] Slightly improved patch
Are you sure you wanted to remove the loop: for (i = 0; i < node->values_count; i++) { ?
(In reply to comment #2) > Are you sure you wanted to remove the loop: > for (i = 0; i < node->values_count; i++) { > ? Whoops, you're right. I was thinking the preceding conditional would always have this loop iterate exactly once. Back to my original patch.
Applied. Thanks a lot. http://cgit.freedesktop.org/systemd/systemd/commit/?id=f4443fa5976eca51661947dd4df60847213f27fa
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.