Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565630 - sys-apps/sandbox-2.8+ broken on Sparc64 ("Bus error" in canonicalize_filename_mode())
Summary: sys-apps/sandbox-2.8+ broken on Sparc64 ("Bus error" in canonicalize_filename...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access
  Show dependency tree
 
Reported: 2015-11-12 19:14 UTC by Denis Kaganovich
Modified: 2023-05-08 17:24 UTC (History)
0 users

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


Attachments
sanbox sparc fastfix (libsandbox-sparc.patch,894 bytes, patch)
2015-11-12 19:19 UTC, Denis Kaganovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2015-11-12 19:14:36 UTC
After commit 93d401570d4e54f732c0f821cdbb5ba2e1dee0f3 (bug #540828) sandbox starts to generate sparc-specific "Bus error". After rollback this commit and simple add canonicalize_filename_mode() without "ret=" I see there are only from canonicalize_filename_mode(). I have slow TI UltraSparc IIe (Hummingbird) on work only for fun, so my patch keep only old code here (while? I will try more - may be).

Also better to remove "~sparc" from 2.8 & 2.9.

Reproducible: Always
Comment 1 Denis Kaganovich 2015-11-12 19:19:12 UTC
Created attachment 416808 [details, diff]
sanbox sparc fastfix

Workaround
Comment 2 SpanKY gentoo-dev 2015-11-13 00:50:21 UTC
sorry, but we're not adding arch specific code like this
Comment 3 Denis Kaganovich 2015-11-13 10:23:38 UTC
OK, normal way to fix "portable" gnulib code (this is pointer manipulation/byteorder bug), I just post my fast solution. But anymore "~sparc" in KEYWORDS in this versions must be removed - else after installing 2.8 or 2.9 single way to emerge anything is FEATURES="-sandbox -usersandbox"
Comment 4 SpanKY gentoo-dev 2015-12-19 07:33:28 UTC
sandbox was returning misaligning memory to 4 bytes (size_t).  when the gnulib code went to add the file to the hashed state (record_file), it'd do a 64bit (st_dev) write to 4 byte aligned memory which would trigger the SIGBUS.  fix is to make sure the internal malloc doesn't return unaligned memory.

http://gitweb.gentoo.org/proj/sandbox.git/commit/?id=767becaac8ccf0a271fc7633fafe635bf8126f3e