Re: svn commit: r273734 - head/bin/dd

2014-10-31 Thread Ian Lepore
On Fri, 2014-10-31 at 14:30 -0700, Garrett Cooper wrote: > On Oct 28, 2014, at 4:33, Bruce Evans wrote: > > > On Tue, 28 Oct 2014, [utf-8] Dag-Erling Smørgrav wrote: > > > >> Bruce Evans writes: > >>> Dag-Erling Smørgrav writes: > This is a bug on all platforms, and both clang and (recent

Re: svn commit: r273734 - head/bin/dd

2014-10-31 Thread John-Mark Gurney
Garrett Cooper wrote this message on Fri, Oct 31, 2014 at 14:30 -0700: > On Oct 28, 2014, at 4:33, Bruce Evans wrote: > > > On Tue, 28 Oct 2014, [utf-8] Dag-Erling Smørgrav wrote: > > > >> Bruce Evans writes: > >>> Dag-Erling Smørgrav writes: > This is a bug on all platforms, and both cla

Re: svn commit: r273734 - head/bin/dd

2014-10-31 Thread Garrett Cooper
On Oct 28, 2014, at 4:33, Bruce Evans wrote: > On Tue, 28 Oct 2014, [utf-8] Dag-Erling Smørgrav wrote: > >> Bruce Evans writes: >>> Dag-Erling Smørgrav writes: This is a bug on all platforms, and both clang and (recent) gcc should complain about it. That printf() call will print gar

Re: svn commit: r273734 - head/bin/dd

2014-10-29 Thread NGie Cooper
On Wed, Oct 29, 2014 at 1:08 PM, Kurt Jaeger wrote: > Hi! > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191263 > >> Right now the submitter tests on 32bit and if time permits, I'll >> experiment on ARM as well. > > The submitter has provided a new patch, he tested it and, I tested it on >

Re: svn commit: r273734 - head/bin/dd

2014-10-29 Thread Kurt Jaeger
Hi! https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191263 > Right now the submitter tests on 32bit and if time permits, I'll > experiment on ARM as well. The submitter has provided a new patch, he tested it and, I tested it on - 10.0p10 amd64 - 10.1-RC3-i386 - 10.1-RC3-armv6 (raspberry-pi) A

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Kurt Jaeger
Hi! > Dag-Erling Smørgrav writes: > > Kurt Jaeger writes: > > > I do not have a working arm setup right now. > > This is a bug on all platforms, and both clang and (recent) gcc should > > complain about it. That printf() call will print garbage. > > Correction: it will print garbage on 32-bit

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Bruce Evans
On Tue, 28 Oct 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Bruce Evans writes: Dag-Erling Sm??rgrav writes: This is a bug on all platforms, and both clang and (recent) gcc should complain about it. That printf() call will print garbage. No, this is only a bug on 32-bit arches. The is is SSI

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Dag-Erling Smørgrav
Bruce Evans writes: > Dag-Erling Smørgrav writes: > > This is a bug on all platforms, and both clang and (recent) gcc > > should complain about it. That printf() call will print garbage. > No, this is only a bug on 32-bit arches. The is is SSIZE_MAX. If you mean "it only has consequences on 32

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Bruce Evans
On Tue, 28 Oct 2014, [utf-8] Dag-Erling Sm??rgrav wrote: Kurt Jaeger writes: Konstantin Belousov writes: On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: /scratch/tmp/kib/src/bin/dd/args.c:192: warning: format '%jd' expects type 'intmax_t', but argument 3 has type 'int' Thanks

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Dag-Erling Smørgrav
Dag-Erling Smørgrav writes: > Kurt Jaeger writes: > > I do not have a working arm setup right now. > This is a bug on all platforms, and both clang and (recent) gcc should > complain about it. That printf() call will print garbage. Correction: it will print garbage on 32-bit platforms, where si

Re: svn commit: r273734 - head/bin/dd

2014-10-28 Thread Dag-Erling Smørgrav
Kurt Jaeger writes: > Konstantin Belousov writes: > > On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: > > /scratch/tmp/kib/src/bin/dd/args.c:192: warning: format '%jd' expects type > > 'intmax_t', but argument 3 has type 'int' > Thanks for the pointer. I'll take it up with the submi

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Kurt Jaeger
Hi! > > So, given this detailed review, should I revert the change ? > > Yes. You would have to change half of it just to get it to compile > on 32-bit arches. Done. It's clearly my fault, I was sloppy in testing 8-( -- p...@freebsd.org +49 171 31013726 years to go ! _

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Ian Lepore
On Mon, 2014-10-27 at 17:20 +0100, Kurt Jaeger wrote: > Hi! > > > > Log: > > > bin/dd: Fix incorrect casting of arguments > [...] > > Both of these work correctly in my version (with a relatively small patch > > and no breakage of other cases). (I actually typed large values as -1 > > and 11

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments [...] Both of these work correctly in my version (with a relatively small patch and no breakage of other cases). (I actually typed large values as -1 and 11. -1 means (uintmax_t)-

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Kurt Jaeger
Hi! > > Log: > > bin/dd: Fix incorrect casting of arguments [...] > Both of these work correctly in my version (with a relatively small patch > and no breakage of other cases). (I actually typed large values as -1 > and 11. -1 means (uintmax_t)-1 although this > is undoc

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Konstantin Belousov
On Mon, Oct 27, 2014 at 04:54:27PM +0100, Kurt Jaeger wrote: > > On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: > > > Author: pi (ports committer) > > > Date: Mon Oct 27 11:38:17 2014 > > > New Revision: 273734 > > > URL: https://svnweb.freebsd.org/changeset/base/273734 > > > > > > L

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original arguments were negative. This caused wrong behaviour in some boundary cases: $

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Bruce Evans
On Mon, 27 Oct 2014, Konstantin Belousov wrote: On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: Log: bin/dd: Fix incorrect casting of arguments This causes non-trivial amount of errors like cc1: warnings being treated as errors /scratch/tmp/kib/src/bin/dd/args.c: In function 'f

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Kurt Jaeger
> On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: > > Author: pi (ports committer) > > Date: Mon Oct 27 11:38:17 2014 > > New Revision: 273734 > > URL: https://svnweb.freebsd.org/changeset/base/273734 > > > > Log: > > bin/dd: Fix incorrect casting of arguments > This causes non-triv

Re: svn commit: r273734 - head/bin/dd

2014-10-27 Thread Konstantin Belousov
On Mon, Oct 27, 2014 at 11:38:17AM +, Kurt Jaeger wrote: > Author: pi (ports committer) > Date: Mon Oct 27 11:38:17 2014 > New Revision: 273734 > URL: https://svnweb.freebsd.org/changeset/base/273734 > > Log: > bin/dd: Fix incorrect casting of arguments This causes non-trivial amount of erro

svn commit: r273734 - head/bin/dd

2014-10-27 Thread Kurt Jaeger
Author: pi (ports committer) Date: Mon Oct 27 11:38:17 2014 New Revision: 273734 URL: https://svnweb.freebsd.org/changeset/base/273734 Log: bin/dd: Fix incorrect casting of arguments dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or n