Re: LP64 alignment issue in 4.4.9 and CVS

2007-06-27 Thread Jeff Johnson


On Jun 26, 2007, at 12:28 PM, Tim Mooney wrote:



rpm 4.4.9 on sparcv9-sun-solaris2.8 (LP64) compiled with the Sun  
Workshop

11 compiler gets a reproduceable SIGBUS when installing a package or
importing a key with a fresh database.  I haven't seen this problem on
my x86_64-sun-solaris2.10 workstation which is also running rpm 4.4.9.
x86_64 must be more forgiving of alignment than LP64 sparc.



This bug was reported by PLD/sparc64 abt a week ago. There's an  
alignment
issues with hcolor. See recent checkin for fix on both HEAD and  
rpm-4_5.


hth

73 de Jeff
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: LP64 alignment issue in 4.4.9 and CVS

2007-06-27 Thread Tim Mooney

In regard to: Re: LP64 alignment issue in 4.4.9 and CVS, Jeff Johnson said...:


On Jun 26, 2007, at 12:28 PM, Tim Mooney wrote:


rpm 4.4.9 on sparcv9-sun-solaris2.8 (LP64) compiled with the Sun Workshop
11 compiler gets a reproduceable SIGBUS when installing a package or
importing a key with a fresh database.  I haven't seen this problem on
my x86_64-sun-solaris2.10 workstation which is also running rpm 4.4.9.
x86_64 must be more forgiving of alignment than LP64 sparc.


This bug was reported by PLD/sparc64 abt a week ago. There's an alignment
issues with hcolor. See recent checkin for fix on both HEAD and rpm-4_5.


Thanks for the info, sorry for the duplicate report.

Tim
--
Tim Mooney[EMAIL PROTECTED]
Information Technology Services   (701) 231-1076 (Voice)
Room 242-J6, IACC Building(701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: LP64 alignment issue in 4.4.9 and CVS

2007-06-27 Thread Jeff Johnson


On Jun 27, 2007, at 2:55 PM, Tim Mooney wrote:



This bug was reported by PLD/sparc64 abt a week ago. There's an  
alignment
issues with hcolor. See recent checkin for fix on both HEAD and  
rpm-4_5.


Thanks for the info, sorry for the duplicate report.



Heh, thanks for reporting even if duplicate. The bug has been there  
for a while,

easy fixing when reported. The problem is seen only on sparc64.

73 de Jeff
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: LP64 alignment issue in 4.4.9 and CVS

2007-06-26 Thread Tim Mooney

In regard to: Re: LP64 alignment issue in 4.4.9 and CVS, Mark Hatle said...:


Have you tried compiling w/ -mstrict-align (assuming you are using gcc)?
This might at the least work around the issue.


I'm not using gcc, although your comment is still useful, since it
got me looking at the alignment options for the Sun compilers.  I think if
I wanted to work around this issue, I could use

-xmemalign=8i

Also:


uint32_t hcolor = 0;

...

if (!hge(h, RPMTAG_PACKAGECOLOR, bnt, (void **) hcolor, count)) {


Because hcolor starts out as a 32 bit quantity, it's aligned on a 4-byte
boundary.  It's later used in a context where it would need to be aligned
on an 8-byte boundary.  If I make the same fix that I did for the
problem I reported last October, changing the type from uint32_t to
uint64_t, the problem goes away.

It looks like there might be another problem lurking nearby with the

int32_t tid = iid;

but I haven't actually triggered that problem yet.


After looking at it further, I don't think int32_t tid is going
to be a problem, since it's used in a different way and not cast to (void
**).

Tim
--
Tim Mooney[EMAIL PROTECTED]
Information Technology Services   (701) 231-1076 (Voice)
Room 242-J6, IACC Building(701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org