bug in asm-ppc/div64.h

3 messages, 3 authors, 2003-03-11 · open the first message on its own page

bug in asm-ppc/div64.h

From: Bastien Nocera <hidden>
Date: 2003-03-11 11:03:33

Hello,

While chasing a date bug in smbfs with Urban Widmark, it so happened
that we stumbled across a bug in do_div on PPC 32bit, ie. it doesn't
work.

I attached a test case, provided by Urban. do_div is used in quite a few
places like vsprintf, the matrox fb code, etc.

When running on x86:
now: 1047238073
adjusted: 24edd64059e100
/ 10000000: 3df4e80a
1039460362

Check the run on PPC. It's wrong by quite a scale.

Any ideas on how to solve this properly ?

Cheers

--
/Bastien Nocera
http://www.redhat.com

Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away.
                                                Antoine de Saint-Exupery

Re: bug in asm-ppc/div64.h

From: Paul Mackerras <hidden>
Date: 2003-03-11 11:04:01

Bastien Nocera writes:
While chasing a date bug in smbfs with Urban Widmark, it so happened
that we stumbled across a bug in do_div on PPC 32bit, ie. it doesn't
work.
Grab a copy of include/asm-ppc/div64.h and arch/ppc/lib/div64.S from
a 2.5 tree.

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: bug in asm-ppc/div64.h

From: Bastien Nocera <hadess@hadess.net>
Date: 2003-03-11 11:23:59

Hi Paul,

On Tue, 2003-03-11 at 11:04, Paul Mackerras wrote:
Bastien Nocera writes:
quoted
While chasing a date bug in smbfs with Urban Widmark, it so happened
that we stumbled across a bug in do_div on PPC 32bit, ie. it doesn't
work.
Grab a copy of include/asm-ppc/div64.h and arch/ppc/lib/div64.S from
a 2.5 tree.
Ben just pointed me to these files. I'll give it a try. Are there any
plans to backport these ? All my files on an SMB share appear with the
wrong dates because of that bug.

Cheers

PS: And sorry about the spam, and badly signed mails...
--
/Bastien Nocera
http://hadess.net

#2  0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from
/lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity);
Segmentation fault

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help