Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 558436

Summary: sys-apps/net-tools has unaligned accesses
Product: Gentoo Linux Reporter: Matt Turner <mattst88>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/p/net-tools/mailman/message/34405951/
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 371525    

Description Matt Turner gentoo-dev 2015-08-22 20:38:08 UTC
Running /bin/route on alpha is enough to generate 63 unaligned accesses. Compiling with -Wcast-align shows other problematic bits.
Comment 1 SpanKY gentoo-dev 2015-08-25 22:56:47 UTC
this largely comes down to net-tools using struct sockaddr in many places for storage and then casting it to other sockaddr types (which might have higher alignment requirements).  switching everything to sockaddr_storage should fix it, but requires a good amount of yak shaving since the pointer type is encoded in many many functions :/.

i've done it locally, and even then it doesn't fix all points, just the vast majority.  it might be the few that are left we don't care about until someone actually complains (as the alignment coming through might be sufficient).
Comment 2 SpanKY gentoo-dev 2015-08-26 03:36:10 UTC
pushed a bunch of fixes upstream, but the last two needed to fix this particular crash are pending RFC on the mailing list
Comment 3 Matt Turner gentoo-dev 2015-11-15 01:55:43 UTC
Thanks Mike.

Looks like there wasn't much discussion. Time to push the last two patches upstream?
Comment 4 SpanKY gentoo-dev 2015-11-24 14:56:23 UTC
i've pushed them upstream now and included in the new net-tools-1.60_p20151124144947

http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb8750476cb74179f39e08123acc52130aaccb96