Bug#360666: joe now crashes with HOME set

2006-04-04 Thread Josip Rodin
On Mon, Apr 03, 2006 at 07:37:49PM -0400, Daniel Jacobowitz wrote:
 It may be something catastrophic that has gone wrong in the amd64
 archive rebuild?  It definitely did not happen with my previously
 installed 3.3-2, this afternoon.  I switched to the http.us.debian.org
 archive today and upgraded to 3.3-3 and it exploded.
 
 However, I can rebuild from source and reproduce it.  Ah, I see.
 
 1300p = (unsigned char *)getenv(HOME);
 1301f = 0;
 1302if (p) {
 1303joe_snprintf_2((char 
 *)buf,sizeof(buf),%s/.joe/charmaps/%s,p,name);
 1304f = fopen((char *)buf,r);
 1305}
 
 We're at line 1303 and p == NULL.
 
 charmap.c: In function 'find_charmap':
 charmap.c:1300: warning: cast to pointer from integer of different size
 
 If you want to use getenv, please, please, please, include its
 prototype.  It looks like HAVE_STDLIB_H has not gotten set, presumably
 because nothing has bothered to include autoconf.h before testing it.
 
 If you include config.h first, this works.

I'll fix that bit, thanks.

 I saw similar warnings when building termcap.c and i18n.c.  i18n.c is also
 missing config.h, but adding it does not fix the warnings.

 termcap.c: In function 'jgetstr':
 termcap.c:414: warning: cast to pointer from integer of different size
 termcap.c: In function 'texec':
 termcap.c:519: warning: cast to pointer from integer of different size
 i18n.c: In function 'joe_towupper':
 i18n.c:2723: warning: cast to pointer from integer of different size
 i18n.c:2724: warning: cast to pointer from integer of different size
 i18n.c: In function 'joe_towlower':
 i18n.c:3517: warning: cast to pointer from integer of different size
 i18n.c:3518: warning: cast to pointer from integer of different size
 
 So, there are probably other problems lurking.

Ah, yes, I was told to watch for that on ia64, and indeed
http://buildd.debian.org/build.php?pkg=joever=3.3-3arch=ia64file=log
has the same. I'll try to tend to them all.

 There's some good warnings in -Wall for this... but the result of
 compiling joe with -Wall is not confidence-inspiring.

:(

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360666: joe now crashes with HOME set

2006-04-04 Thread Josip Rodin
On Tue, Apr 04, 2006 at 11:20:57AM +0200, Josip Rodin wrote:
  I saw similar warnings when building termcap.c and i18n.c.  i18n.c is also
  missing config.h, but adding it does not fix the warnings.
 
  termcap.c: In function 'jgetstr':
  termcap.c:414: warning: cast to pointer from integer of different size
  termcap.c: In function 'texec':
  termcap.c:519: warning: cast to pointer from integer of different size
  i18n.c: In function 'joe_towupper':
  i18n.c:2723: warning: cast to pointer from integer of different size
  i18n.c:2724: warning: cast to pointer from integer of different size
  i18n.c: In function 'joe_towlower':
  i18n.c:3517: warning: cast to pointer from integer of different size
  i18n.c:3518: warning: cast to pointer from integer of different size
  
  So, there are probably other problems lurking.
 
 Ah, yes, I was told to watch for that on ia64, and indeed
 http://buildd.debian.org/build.php?pkg=joever=3.3-3arch=ia64file=log
 has the same. I'll try to tend to them all.

They were all fairly silly, all instances of the same problem. 3.3-5 should
have fixed them all, because I built and ran that version on merkel
successfully now. If you notice any remaining problems, please reopen the
bug.

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360666: joe now crashes with HOME set

2006-04-03 Thread Daniel Jacobowitz
Package: joe
Version: 3.3-3
Severity: grave
Justification: renders package unusable

The changelog says this release fixed a bug which caused Joe to crash at
startup if HOME was unset.  Well, now it crashes if HOME is set; a NULL
pointer is passed to sprintf where the home directory is obviously wanted.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc1
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages joe depends on:
ii  libc6 2.3.6-4GNU C Library: Shared libraries an
ii  libncurses5   5.5-1  Shared libraries for terminal hand

joe recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360666: joe now crashes with HOME set

2006-04-03 Thread Josip Rodin
On Mon, Apr 03, 2006 at 06:51:39PM -0400, Daniel Jacobowitz wrote:
 Package: joe
 Version: 3.3-3
 Severity: grave
 Justification: renders package unusable
 
 The changelog says this release fixed a bug which caused Joe to crash at
 startup if HOME was unset.  Well, now it crashes if HOME is set; a NULL
 pointer is passed to sprintf where the home directory is obviously wanted.

What? I can't reproduce that on my poor old normal sarge system.
Can you please point me to the exact point in code where this breaks for you?

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360666: joe now crashes with HOME set

2006-04-03 Thread Josip Rodin
On Mon, Apr 03, 2006 at 06:51:39PM -0400, Daniel Jacobowitz wrote:
 Package: joe
 Version: 3.3-3
 Severity: grave
 Justification: renders package unusable
 
 The changelog says this release fixed a bug which caused Joe to crash at
 startup if HOME was unset.

And actually that was 3.3-1's changelog entry, and that one was uploaded
almost two months ago...

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360666: joe now crashes with HOME set

2006-04-03 Thread Daniel Jacobowitz
On Tue, Apr 04, 2006 at 01:22:33AM +0200, Josip Rodin wrote:
 On Mon, Apr 03, 2006 at 06:51:39PM -0400, Daniel Jacobowitz wrote:
  Package: joe
  Version: 3.3-3
  Severity: grave
  Justification: renders package unusable
  
  The changelog says this release fixed a bug which caused Joe to crash at
  startup if HOME was unset.  Well, now it crashes if HOME is set; a NULL
  pointer is passed to sprintf where the home directory is obviously wanted.
 
 What? I can't reproduce that on my poor old normal sarge system.
 Can you please point me to the exact point in code where this breaks for you?

It may be something catastrophic that has gone wrong in the amd64
archive rebuild?  It definitely did not happen with my previously
installed 3.3-2, this afternoon.  I switched to the http.us.debian.org
archive today and upgraded to 3.3-3 and it exploded.

However, I can rebuild from source and reproduce it.  Ah, I see.

1300p = (unsigned char *)getenv(HOME);
1301f = 0;
1302if (p) {
1303joe_snprintf_2((char 
*)buf,sizeof(buf),%s/.joe/charmaps/%s,p,name);
1304f = fopen((char *)buf,r);
1305}

We're at line 1303 and p == NULL.

charmap.c: In function 'find_charmap':
charmap.c:1300: warning: cast to pointer from integer of different size

If you want to use getenv, please, please, please, include its
prototype.  It looks like HAVE_STDLIB_H has not gotten set, presumably
because nothing has bothered to include autoconf.h before testing it.

If you include config.h first, this works.  I saw similar warnings when
building termcap.c and i18n.c.  i18n.c is also missing config.h, but
adding it does not fix the warnings.

termcap.c: In function 'jgetstr':
termcap.c:414: warning: cast to pointer from integer of different size
termcap.c: In function 'texec':
termcap.c:519: warning: cast to pointer from integer of different size
i18n.c: In function 'joe_towupper':
i18n.c:2723: warning: cast to pointer from integer of different size
i18n.c:2724: warning: cast to pointer from integer of different size
i18n.c: In function 'joe_towlower':
i18n.c:3517: warning: cast to pointer from integer of different size
i18n.c:3518: warning: cast to pointer from integer of different size

So, there are probably other problems lurking.

There's some good warnings in -Wall for this... but the result of
compiling joe with -Wall is not confidence-inspiring.

-- 
Daniel Jacobowitz
CodeSourcery


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]