* git-rebase (1.5.0.6) errors
@ 2007-05-18  8:47 Ilpo Järvinen
  2007-05-18 10:31 ` Paolo Teti
  0 siblings, 1 reply; 9+ messages in thread
From: Ilpo Järvinen @ 2007-05-18  8:47 UTC (permalink / raw)
  To: git
Hi,
ijjarvin@kivilampi-30:~/work/src/submit$ git-rebase net-2.6.22-origin
First, rewinding head to replay your work on top of it...
HEAD is now at d739437... [IPV4]: Correct rp_filter help text.
fatal: cannot convert from utf-8 to utf-8
ijjarvin@kivilampi-30:~/work/src/submit$ git-log -n 1 | cat
commit d739437207064cdcea8f9c81442284106cbcb67f
Author: Dave Jones <davej@redhat.com>
Date:   Thu May 17 15:02:21 2007 -0700
    [IPV4]: Correct rp_filter help text.
    
    As mentioned in http://bugzilla.kernel.org/show_bug.cgi?id=5015
    The helptext implies that this is on by default.
    This may be true on some distros (Fedora/RHEL have it enabled
    in /etc/sysctl.conf), but the kernel defaults to it off.
    
    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
ijjarvin@kivilampi-30:~/work/src/submit$ git-rebase --abort
HEAD is now at e413863... [TCP] FRTO: Add missing ECN CWR sending to one of the responses
ijjarvin@kivilampi-30:~/work/src/submit$ git --version
git version 1.5.0.6
I find at least two problems in it...
  - Non-sense error message: "convert from utf-8 to utf-8" ?!?
  - It fails to rebase the e413863 changeset
-- 
 i.
^ permalink raw reply	[flat|nested] 9+ messages in thread* Re: git-rebase (1.5.0.6) errors 2007-05-18 8:47 git-rebase (1.5.0.6) errors Ilpo Järvinen @ 2007-05-18 10:31 ` Paolo Teti 2007-05-18 10:49 ` David Kastrup 2007-05-18 14:02 ` Ilpo Järvinen 0 siblings, 2 replies; 9+ messages in thread From: Paolo Teti @ 2007-05-18 10:31 UTC (permalink / raw) To: Ilpo Järvinen; +Cc: git 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>: > Hi, > > > ijjarvin@kivilampi-30:~/work/src/submit$ git-rebase net-2.6.22-origin > First, rewinding head to replay your work on top of it... > HEAD is now at d739437... [IPV4]: Correct rp_filter help text. > fatal: cannot convert from utf-8 to utf-8 Now I can't test or try to reproduce your error, but looking at the source code (only with gitweb) I have found another bad use of size_t instead of ssize_t in the reencode_string(..) that take part at the conversion process. Using size_t in the next portion of code the check "count == -1" is never true. while (1) { size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz); if (cnt == -1) { size_t sofar; if (errno != E2BIG) { free(out); iconv_close(conv); return NULL; } Please someone could fixes this bad use of size_t?.. Sorry, but now I can't install/use git because I'm on a customer workstation.. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-18 10:31 ` Paolo Teti @ 2007-05-18 10:49 ` David Kastrup 2007-05-18 11:29 ` Paolo Teti 2007-05-18 14:02 ` Ilpo Järvinen 1 sibling, 1 reply; 9+ messages in thread From: David Kastrup @ 2007-05-18 10:49 UTC (permalink / raw) To: git "Paolo Teti" <paolo.teti@gmail.com> writes: > 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>: >> Hi, >> >> >> ijjarvin@kivilampi-30:~/work/src/submit$ git-rebase net-2.6.22-origin >> First, rewinding head to replay your work on top of it... >> HEAD is now at d739437... [IPV4]: Correct rp_filter help text. >> fatal: cannot convert from utf-8 to utf-8 > > > Now I can't test or try to reproduce your error, > but looking at the source code (only with gitweb) > I have found another bad use of size_t instead of ssize_t > in the reencode_string(..) that take part at the conversion process. > > Using size_t in the next portion of code the check "count == -1" is > never true. Only if size_t is a larger type than int (could be on x86-64 and alpha architectures). Other than that, this comparison would work. Which does not mean that this does not warrant fixing, but it is not necessarily the cause of this problem. > > while (1) { > size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz); > > if (cnt == -1) { > size_t sofar; > if (errno != E2BIG) { > free(out); > iconv_close(conv); > return NULL; > } > > > Please someone could fixes this bad use of size_t?.. -- David Kastrup ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-18 10:49 ` David Kastrup @ 2007-05-18 11:29 ` Paolo Teti 0 siblings, 0 replies; 9+ messages in thread From: Paolo Teti @ 2007-05-18 11:29 UTC (permalink / raw) To: David Kastrup; +Cc: git 2007/5/18, David Kastrup <dak@gnu.org>: > "Paolo Teti" <paolo.teti@gmail.com> writes: > > > 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>: > >> Hi, > >> > >> > >> ijjarvin@kivilampi-30:~/work/src/submit$ git-rebase net-2.6.22-origin > >> First, rewinding head to replay your work on top of it... > >> HEAD is now at d739437... [IPV4]: Correct rp_filter help text. > >> fatal: cannot convert from utf-8 to utf-8 > > > > > > Now I can't test or try to reproduce your error, > > but looking at the source code (only with gitweb) > > I have found another bad use of size_t instead of ssize_t > > in the reencode_string(..) that take part at the conversion process. > > > > Using size_t in the next portion of code the check "count == -1" is > > never true. > > Only if size_t is a larger type than int (could be on x86-64 and alpha > architectures). Other than that, this comparison would work. Which > does not mean that this does not warrant fixing, but it is not > necessarily the cause of this problem. 1. Yes this is not necessarily the cause.. I agree. 2. size_t as I know is unsigned and ssize_t is the signed version of size_t.. so to compare with -1 we want ssize_t. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-18 10:31 ` Paolo Teti 2007-05-18 10:49 ` David Kastrup @ 2007-05-18 14:02 ` Ilpo Järvinen 2007-05-18 14:39 ` Paolo Teti 2007-05-20 12:43 ` Jan Hudec 1 sibling, 2 replies; 9+ messages in thread From: Ilpo Järvinen @ 2007-05-18 14:02 UTC (permalink / raw) To: David Kastrup; +Cc: Paolo Teti, git [-- Attachment #1: Type: TEXT/PLAIN, Size: 761 bytes --] David Kastrup <dak@gnu.org> wrote: > Only if size_t is a larger type than int (could be on x86-64 and alpha > architectures). Other than that, this comparison would work. Which > does not mean that this does not warrant fixing, but it is not > necessarily the cause of this problem. ...sizeof(size_t) == sizeof(int) should hold... Anyway, if this has any relevance: I'm using non-utf system, and (as you see) my surname has ä... The system was recently upgraded to git 1.5+ which started to complain also about a missing i18n.commitencoding, figured out that when I set it to utf8 (empty => defaults to it) and have signed-off line (with native non-utf ä), I get that error... ...and please, do not drop me from cc since I'm not subscribed... -- i. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-18 14:02 ` Ilpo Järvinen @ 2007-05-18 14:39 ` Paolo Teti [not found] ` <864pmamb6b.fsf@lola.quinscape.zz> 2007-05-20 12:43 ` Jan Hudec 1 sibling, 1 reply; 9+ messages in thread From: Paolo Teti @ 2007-05-18 14:39 UTC (permalink / raw) To: Ilpo Järvinen; +Cc: David Kastrup, git 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>: > ...sizeof(size_t) == sizeof(int) should hold... what I have reported is not necessarily the cause of your error. Yes BUT size_t is UNSIGNED and ssize_t is SIGNED. The problem is that We store a signed return value into a unsigned variable. So the check against -1 has no sense. and please note that also sizeof(int) == sizeof(unsigned int), but -1 is a signed int !! I repeat: this is not necessarily the cause of your error. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <864pmamb6b.fsf@lola.quinscape.zz>]
* Re: git-rebase (1.5.0.6) errors [not found] ` <864pmamb6b.fsf@lola.quinscape.zz> @ 2007-05-18 15:08 ` Paolo Teti 0 siblings, 0 replies; 9+ messages in thread From: Paolo Teti @ 2007-05-18 15:08 UTC (permalink / raw) To: David Kastrup; +Cc: Ilpo Järvinen, git 2007/5/18, David Kastrup <dak@gnu.org>: > "Paolo Teti" <paolo.teti@gmail.com> writes: > > > 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>: > > > >> ...sizeof(size_t) == sizeof(int) should hold... > > > > what I have reported is not necessarily the cause of your error. Yes > > > > BUT size_t is UNSIGNED and ssize_t is SIGNED. > > > > The problem is that We store a signed return value into a unsigned variable. > > So the check against -1 has no sense. > > When comparing signed with unsigned types, the signed values are first > converted to unsigned, then possibly zero-extended. > > So > > (unsigned)-1 == (int)-1 > > but > > (unsigned long)-1 == (long)-1 > > only when sizeof(long)==size(int) > > > and please note that also sizeof(int) == sizeof(unsigned int), but > > -1 is a signed int !! > > So? > Stupid me.. OK is == -1 and not < 0.. Probably today I'm drunk without drink .. Enjoy ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-18 14:02 ` Ilpo Järvinen 2007-05-18 14:39 ` Paolo Teti @ 2007-05-20 12:43 ` Jan Hudec 2007-05-20 19:02 ` Ilpo Järvinen 1 sibling, 1 reply; 9+ messages in thread From: Jan Hudec @ 2007-05-20 12:43 UTC (permalink / raw) To: Ilpo Järvinen; +Cc: David Kastrup, Paolo Teti, git [-- Attachment #1: Type: text/plain, Size: 1789 bytes --] On Fri, May 18, 2007 at 17:02:56 +0300, Ilpo Järvinen wrote: > David Kastrup <dak@gnu.org> wrote: > > > Only if size_t is a larger type than int (could be on x86-64 and alpha > > architectures). Other than that, this comparison would work. Which > > does not mean that this does not warrant fixing, but it is not > > necessarily the cause of this problem. > > ...sizeof(size_t) == sizeof(int) should hold... Really? $ cat test.c #include <stdio.h> int main(void) { printf("sizeof(int) = %i\n", sizeof(int)); printf("sizeof(long) = %i\n", sizeof(long)); printf("sizeof(size_t) = %i\n", sizeof(size_t)); return 0; } $ gcc -otest test.c $ ./test sizeof(int) = 4 sizeof(long) = 8 sizeof(size_t) = 8 Hm, it does not seem that sizeof(size_t) == sizeof(int). $ uname -m x86_64 Yes, this is a 64-bit system. Anyway, comparing it with -1 is ALWAYS OK in spite of this! $ cat test2.c #include <stdio.h> int main(void) { size_t x = 0; --x; printf("x = 0x%lx\n", x); printf("(x == -1) = %i\n", (x == -1)); return 0; } $ gcc -otest2 test2.c $ ./test2 x = 0xffffffffffffffff (x == -1) = 1 So at least with gcc that comparison is OK anyway. There has to be something else that causes that problem. > Anyway, if this has any relevance: I'm using non-utf system, and (as you > see) my surname has ä... The system was recently upgraded to git 1.5+ > which started to complain also about a missing i18n.commitencoding, > figured out that when I set it to utf8 (empty => defaults to it) and have > signed-off line (with native non-utf ä), I get that error... > > ...and please, do not drop me from cc since I'm not subscribed... > > -- > i. -- Jan 'Bulb' Hudec <bulb@ucw.cz> [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git-rebase (1.5.0.6) errors 2007-05-20 12:43 ` Jan Hudec @ 2007-05-20 19:02 ` Ilpo Järvinen 0 siblings, 0 replies; 9+ messages in thread From: Ilpo Järvinen @ 2007-05-20 19:02 UTC (permalink / raw) To: Jan Hudec; +Cc: David Kastrup, Paolo Teti, git [-- Attachment #1: Type: TEXT/PLAIN, Size: 1224 bytes --] On Sun, 20 May 2007, Jan Hudec wrote: > On Fri, May 18, 2007 at 17:02:56 +0300, Ilpo Järvinen wrote: > > David Kastrup <dak@gnu.org> wrote: > > > > > Only if size_t is a larger type than int (could be on x86-64 and alpha > > > architectures). Other than that, this comparison would work. Which > > > does not mean that this does not warrant fixing, but it is not > > > necessarily the cause of this problem. > > > > ...sizeof(size_t) == sizeof(int) should hold... > > Really? > > $ cat test.c > #include <stdio.h> > int main(void) > { > printf("sizeof(int) = %i\n", sizeof(int)); > printf("sizeof(long) = %i\n", sizeof(long)); > printf("sizeof(size_t) = %i\n", sizeof(size_t)); > return 0; > } > $ gcc -otest test.c > $ ./test > sizeof(int) = 4 > sizeof(long) = 8 > sizeof(size_t) = 8 > > Hm, it does not seem that sizeof(size_t) == sizeof(int). ...On 64-bit perhaps but mine isn't one of them... I'm sorry if my wording was misleading, I meant to say that on my system the equality of sizeof()s should hold... :-) > $ uname -m > x86_64 > > Yes, this is a 64-bit system. ijjarvin@kivilampi-30:~/src/testsize$ ./main sizeof(int) = 4 sizeof(long) = 4 sizeof(size_t) = 4 $ uname -m i686 -- i. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-20 19:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-18  8:47 git-rebase (1.5.0.6) errors Ilpo Järvinen
2007-05-18 10:31 ` Paolo Teti
2007-05-18 10:49   ` David Kastrup
2007-05-18 11:29     ` Paolo Teti
2007-05-18 14:02   ` Ilpo Järvinen
2007-05-18 14:39     ` Paolo Teti
     [not found]       ` <864pmamb6b.fsf@lola.quinscape.zz>
2007-05-18 15:08         ` Paolo Teti
2007-05-20 12:43     ` Jan Hudec
2007-05-20 19:02       ` Ilpo Järvinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).