Re: Ports with possible 64-bit problems

2008-11-05 Thread andrew fresh
On Mon, Nov 03, 2008 at 10:17:50AM -0500, Eric Sproul wrote:
> Christian Weisgerber wrote:
> > A grep over a recent set of amd64 bulk build logs shows these ports
> > generating warnings that indicate possible 64-bit problems:
> > 
> 
> > libssh2-0.18
> 
> Hi,
> I finally got around to setting up an amd64 test platform, and with -current
> from yesterday, I get no warnings of any type during the build.  I'm happy to
> provide the portslogger log if anyone is interested.  I was not able to test 
> at
> the time the warnings were announced (late June), so I'm curious what might 
> have
> changed since then, as I've made no changes to the port, nor have there been 
> any
> upstream updates.

I want to mention that it does have problems.  I was attempting to help
someone on PerlMonks and had problems with p5-Net-SSH2 causing perl to
core dump on amd64.  

http://www.perlmonks.org/?node_id=720724

My reply with test code that caused the dump is the first reply in that 
thread.

I don't actually use it, and didn't have time to file a complete bug
report, but I did see that it was broken.

l8rZ,
-- 
andrew - ICQ# 253198 - Jabber: [EMAIL PROTECTED]

BOFH excuse of the day: endothermal recalibration



Re: Ports with possible 64-bit problems

2008-11-03 Thread Eric Sproul
Christian Weisgerber wrote:
> I do.
> 
> sftp.c: In function `libssh2_sftp_fstat_ex':
> sftp.c:1470: warning: cast to pointer from integer of different size

Interesting... after removing the cached package and doing 'make deinstall &&
make clean', I now see the same warning.  I'm not sure what I did to miss that
before, but sorry for the noise.  I'll go away and see if I can get rid of the
warning.

Regards,
Eric



Re: Ports with possible 64-bit problems

2008-11-03 Thread Christian Weisgerber
Eric Sproul <[EMAIL PROTECTED]> wrote:

> > A grep over a recent set of amd64 bulk build logs shows these ports
> > generating warnings that indicate possible 64-bit problems:
> 
> > libssh2-0.18
> 
> I finally got around to setting up an amd64 test platform, and with -current
> from yesterday, I get no warnings of any type during the build.

I do.

sftp.c: In function `libssh2_sftp_fstat_ex':
sftp.c:1470: warning: cast to pointer from integer of different size

-- 
Christian "naddy" Weisgerber  [EMAIL PROTECTED]



Re: Ports with possible 64-bit problems

2008-11-03 Thread Eric Sproul
Christian Weisgerber wrote:
> A grep over a recent set of amd64 bulk build logs shows these ports
> generating warnings that indicate possible 64-bit problems:
> 

> libssh2-0.18

Hi,
I finally got around to setting up an amd64 test platform, and with -current
from yesterday, I get no warnings of any type during the build.  I'm happy to
provide the portslogger log if anyone is interested.  I was not able to test at
the time the warnings were announced (late June), so I'm curious what might have
changed since then, as I've made no changes to the port, nor have there been any
upstream updates.

Regards,
Eric



Re: Ports with possible 64-bit problems

2008-07-04 Thread Artur Grabowski
"Arnaud Bergeron" <[EMAIL PROTECTED]> writes:

> I'll admit I didn't think about this.  So I'll have to fix it.  It
> helps that most uses of the pointers look like that:
>
> int main() {
> int true = 1;
> void *nonnull = (void *)0x7000;
> true = true && nonnull;
> printf("%d\n", true);
> }
>
> which does work correctly.
>
> Arnaud

I'm pretty sure !! will normalize anything to a correct truth value without
any type problems, but I'm not a C lawyer.

//art



Re: Ports with possible 64-bit problems

2008-07-03 Thread Theo de Raadt
> > "Arnaud Bergeron" <[EMAIL PROTECTED]> writes:
> >
> >> mt-daapd suffers from a case I've named 0.5:
> >>
> >> pointer -> int
> >>
> >> and then the int is used as a truth value.  So this is not a bug.
> >
> > Not a bug? Really?
> >
> > $ cat foo.c
> > int
> > main()
> > {
> >int true;
> >void *nonnull = (void *)0x7000;
> >
> >true = nonnull;
> >printf(true ? "true\n" : "false\n");
> >true = !!nonnull;
> >printf(true ? "true\n" : "false\n");
> > }
> > $ make foo
> > cc -O2 -pipe-o foo foo.c
> > foo.c: In function `main':
> > foo.c:7: warning: assignment makes integer from pointer without a cast
> > $ ./foo
> > false
> > true
> > $
> >
> > //art
> 
> I'll admit I didn't think about this.  So I'll have to fix it.  It
> helps that most uses of the pointers look like that:

And think about the big-endian 64 bit machines too.  If the cast is
in the right place, and you ensure that all memory is allocated below
4GB... guess what happens.



Re: Ports with possible 64-bit problems

2008-07-03 Thread Arnaud Bergeron
2008/7/3 Artur Grabowski <[EMAIL PROTECTED]>:
> "Arnaud Bergeron" <[EMAIL PROTECTED]> writes:
>
>> mt-daapd suffers from a case I've named 0.5:
>>
>> pointer -> int
>>
>> and then the int is used as a truth value.  So this is not a bug.
>
> Not a bug? Really?
>
> $ cat foo.c
> int
> main()
> {
>int true;
>void *nonnull = (void *)0x7000;
>
>true = nonnull;
>printf(true ? "true\n" : "false\n");
>true = !!nonnull;
>printf(true ? "true\n" : "false\n");
> }
> $ make foo
> cc -O2 -pipe-o foo foo.c
> foo.c: In function `main':
> foo.c:7: warning: assignment makes integer from pointer without a cast
> $ ./foo
> false
> true
> $
>
> //art

I'll admit I didn't think about this.  So I'll have to fix it.  It
helps that most uses of the pointers look like that:

int main() {
int true = 1;
void *nonnull = (void *)0x7000;
true = true && nonnull;
printf("%d\n", true);
}

which does work correctly.

Arnaud



Re: Ports with possible 64-bit problems

2008-07-03 Thread Artur Grabowski
"Arnaud Bergeron" <[EMAIL PROTECTED]> writes:

> mt-daapd suffers from a case I've named 0.5:
>
> pointer -> int
>
> and then the int is used as a truth value.  So this is not a bug.

Not a bug? Really?

$ cat foo.c
int
main()
{
int true;
void *nonnull = (void *)0x7000;

true = nonnull;
printf(true ? "true\n" : "false\n");
true = !!nonnull;
printf(true ? "true\n" : "false\n");
}
$ make foo
cc -O2 -pipe-o foo foo.c 
foo.c: In function `main':
foo.c:7: warning: assignment makes integer from pointer without a cast
$ ./foo
false
true
$ 

//art



Re: Ports with possible 64-bit problems

2008-07-02 Thread Dave Anderson
On Wed, 2 Jul 2008, Arnaud Bergeron wrote:

>mt-daapd suffers from a case I've named 0.5:
>
>pointer -> int
>
>and then the int is used as a truth value.  So this is not a bug.
>I'll wait for the decision on silencing innocuous warnings before
>sending a patch if needed.

Um, what if the low-order 32 bits of a non-null pointer are all zero?

Dave

-- 
Dave Anderson
<[EMAIL PROTECTED]>



Re: Ports with possible 64-bit problems

2008-07-02 Thread Arnaud Bergeron
mt-daapd suffers from a case I've named 0.5:

pointer -> int

and then the int is used as a truth value.  So this is not a bug.
I'll wait for the decision on silencing innocuous warnings before
sending a patch if needed.

Arnaud



Re: Ports with possible 64-bit problems

2008-07-02 Thread Christian Weisgerber
Matthew Dempsky <[EMAIL PROTECTED]> wrote:

> I'm looking at the Erlang port's build logs, and I see some "warning:
> cast from pointer to integer of different size" messages.  Are there
> any other messages to look out for?

I grepped for these:

warning: assignment makes integer from pointer without a cast
warning: assignment makes pointer from integer without a cast
warning: cast from pointer to integer of different size
warning: cast to pointer from integer of different size

-- 
Christian "naddy" Weisgerber  [EMAIL PROTECTED]



Re: Ports with possible 64-bit problems

2008-06-30 Thread Matthew Dempsky
On Mon, Jun 30, 2008 at 8:31 AM, Christian Weisgerber
<[EMAIL PROTECTED]> wrote:
> A grep over a recent set of amd64 bulk build logs shows these ports
> generating warnings that indicate possible 64-bit problems:

I'm looking at the Erlang port's build logs, and I see some "warning:
cast from pointer to integer of different size" messages.  Are there
any other messages to look out for?



Re: Ports with possible 64-bit problems

2008-06-30 Thread Stuart Henderson
On 2008/06/30 15:31, Christian Weisgerber wrote:
> A grep over a recent set of amd64 bulk build logs shows these ports
> generating warnings that indicate possible 64-bit problems:

Build logs of these are available at http://spacehopper.org/amd64-logs/



Ports with possible 64-bit problems

2008-06-30 Thread Christian Weisgerber
A grep over a recent set of amd64 bulk build logs shows these ports
generating warnings that indicate possible 64-bit problems:

915resolution-0.5.3
9wm-1.2prep0
ADMsmb-0.2p0
BitchX-1.0c18p3
Canna35b2
Imaging-1.1.5-python2.4
Imaging-1.1.5-python2.5
STk-4.0.1p4
TclCurl-0.10.5p3
Tktable-2.9p0
WindowMaker-0.92.0
Wnn4.2
XPostitPlus-2.3p2
Xaw3d-1.5p1
XawMu-1.5p1
Xdialog-2.3.1
a2ps-4.13bp4-a4
a2ps-4.13bp4-letter
aalib-1.4-no_x11
aalib-1.4
agm-1.3.1p1
amaya-5.1p3-motif
amiwm-0.20.48
analog-6.0p1
angband-3.0.6p0-no_x11
angband-3.0.6p0
ap2-mod_fastcgi-2.4.2
app_conference-20070809p0
aqualung-0.9beta9.1p3
archie-1.4.1
arena-0.9.13
arm-elf-binutils-2.16
arm-elf-gdb-6.4
arm-elf-newlib-1.14.0
arts-1.5.9p0
ascd-0.13.2p1
asfiles-1.0
atomix-2.14.0p0
audacious-plugins-1.5.0
avidemux-2.4.1p1
avr-binutils-2.15p0
axe-6.1.2p0
axyftp-0.5.1p1
beaver-0.2.7p0
bibview-2.2
blender-2.45p1
bmp-0.9.7
bombermaze-0.6.6p1
bricons-3.0p0
brltty-3.6
btoa-5.2.1
cdrtools-2.01p1
cfengine-2.2.1p1
cftp-0.12p0
chbg-1.5
chipmunk-1.57p0
clamav-0.93
clamsmtp-1.8p1
claws-mail-3.4.0-ldap
cnagios-0.25
coldfire-0.3.1
connect4-3.2p0
cook-2.21
cooledit-3.17.14p3-python
cooledit-3.17.14p3
corewars-0.9.13
cssed-0.4.0p4
ctwm-3.6p0
cyrus-imapd-2.3.12-drac
cyrus-imapd-2.3.12
cyrus-sasl-2.1.22p4-ldap
dc_gui-0.42p0
dctc-0.68.0
dia-0.96.1p7
digikam-0.9.3
docbook-to-man-0.0p0
dovecot-1.0.15-ldap-mysql-postgresql-sqlite
dovecot-1.0.15-ldap
dovecot-1.0.15-mysql
dovecot-1.0.15-postgresql
dovecot-1.0.15-sqlite
dovecot-1.0.15
doxygen-1.5.4.src
dspam-3.8.0-sqlite3-ldap
dvd+rw-tools-7.0p0
dynamips-0.2.8rc2p0
e-20071211p3
e16keyedit-0.5
ecore-20071211
edje-20071211
elm-2.4ME+66
embryo-20071211
emiclock-2.0.2p0
enigmail-0.95.6
erlang-12b.3
es-0.9b1p0
eterm-0.9.4p0-kanji
eterm-0.9.4p0
etk-20071211p1
ettercap-0.7.3p0-no_x11
ettercap-0.7.3p0
evolution-data-server-2.22.2p0
evolution-plugin-rss-0.0.8p1
exim-4.69-ldap
exim-4.69-mysql
exim-4.69-no_exiscan
exim-4.69-postgresql
exim-4.69
expect-5.43.0p0-no_tk
expect-5.43.0p0
extace-1.9.9
faces-1.6.1
falconseye-1.9.3p2
fbpanel-4.12
fcgi-2.4.0p3
feh-1.3.4
festival-1.95betap2-ogi
festival-1.95betap2
figlet-2.2.1p0
findutils-4.1p0
flite-1.2p1
fltk-1.1.7p0
fluidsynth-1.0.8p0
fox-1.6.28
freeciv-2.1.4
freedroid-1.0.2
fvwm-2.4.20-i18n
fvwm-2.4.20
fvwm95-2.0.43ap1
fxtv-1.03p2
gail-1.20.2p3
galculator-1.3.1p1
galeon-2.0.3p3
gbdfed-1.4
geany-0.13p2
gedit-2.20.4p3
gegl-0.0.16
generator-0.35r2p0
gettext-0.17
ghc-6.6.1
ghostscript-8.62p1-a4-cups
ghostscript-8.62p1-a4-gtk-cups
ghostscript-8.62p1-a4-gtk
ghostscript-8.62p1-a4-no_x11-cups
ghostscript-8.62p1-a4-no_x11
ghostscript-8.62p1-a4
ghostscript-8.62p1-cups
ghostscript-8.62p1-gtk-cups
ghostscript-8.62p1-gtk
ghostscript-8.62p1-no_x11-cups
ghostscript-8.62p1-no_x11
ghostscript-8.62p1
gkrellsun-0.12.1p9
glimpse-4.1p1
glut-3.7p2
gmudix-0.10p5
gnats-3.113.1p4
gnokii-0.6.14p7
gnome-keyring-manager-2.20.0p0
gnome-scan-0.6
gnopernicus-1.1.2p2
gnumeric-1.8.3
gnupg-1.4.9
gnustep-gui-0.14.0
gnutls-2.0.4
gofer-2.30a
gok-1.3.7p4
golem-0.0.5p0
gphoto-0.4.3p3
gphoto-2.4.1
gpsbabel-1.3.4
gq-1.0beta1p8
grace-5.1.15p0
grip-3.2.0p10
grisbi-0.5.9p1
gromit-20041213p5
grpn-1.1.2
gtetrinet-0.7.11
gtimer-1.1.6p0
gtk+-2.12.9
gtk-engines2-2.14.1
gtkaml-0.2.1.0p0
gtkballs-3.1.5p5
gtkglext-1.2.0p0
gtklp-1.2.6
gtksee-0.5.0
gutenprint-5.0.1
gv-3.5.8p4
hexcalc-19951219
hnb-1.9.17
hoc-1.1p0
honeyd-1.5cp2
howl-1.0.0p0
ht-2.0.14-no_x11
ht-2.0.14
hugs98-2005.03
hyperestraier-1.4.13
hypermail-2.1.8p0-gdbm
hypermail-2.1.8p0
icb-5.0.9p3
iksemel-1.2
imap-2007a1-plaintext
imap-2007a1
imapproxy-1.2.5p1
imlib-1.9.14p6
intel2gas-1.3.3
iodbc-3.52.4
ion-20070318p1
irssi-silc-1.1.4
isc-dhcp-3.1.0
isearch-1.14
isic-0.07
isomaster-1.3.1
ispell-3.2.06
itcl-3.3p0
ivan-0.50p0
iview-1.4
ja-kterm-6.2.0p3-xaw3d
ja-kterm-6.2.0p3
ja-less-3.32pl2.48p0
jabberd-2.0s11p4-mysql-ldap
jabberd-2.0s11p4-mysql
jdk-1.5.0.14
jdk-1.7.0.00
jed-0.99.16-no_x11
jed-0.99.16
jesred-1.2.1p0
jlint-3.0
json-c-0.7
junkbuster-2.0.2p2
kaffe-1.1.7
kakasi-2.3.4
kanatest-0.3.6p3
kanjips-19900310
kazehakase-0.5.4
kdebase-3.5.9
kdeedu-3.5.9
kdemultimedia-3.5.9
kdenetwork-3.5.9
kdepim-3.5.9p0
kicad-20070115
klone-2.1ap0
koffice-1.6.3p4
konqueror-20060121p2
larswm-7.5.3p1
lesstif-0.92.6p0
lgeneral-0.5.0
libast-0.7p3
libbonobo-2.20.3p3
libfmt-2.0
libgail-gnome-1.20.0p2
libgnomeprint-2.18.4p1
libgphoto-2.4.1
libical-0.27
libmal-0.44
libmatchbox-1.8p1
libnasl-2.2.9p0
libnetdude-0.10ap0
libproplist-0.10.1p1
libssh2-0.18
libunicode-0.4p1
libxml1-1.8.17p2
lifelines-3.0.60p0
liferea-1.4.15
lighttpd-1.4.19p3-ldap-mysql
lighttpd-1.4.19p3-ldap
links-1.00pre20
linleech-2.2.1
liveMedia-20080409
lmbench-1.1
logsurfer-1.5bp0
lopster-1.2.2
lout-3.30
maelstrom-3.0.6p0
magicpoint-1.11bp6
mbrowse-0.3.1
mcl-06_058
mcsim-4.2.0
meanwhile-1.0.2p1
metamail-2.7p0
mgdiff-1.0p0
mico-2.3.6p2
micropolis-20080211
mimedefang-2.64
minimo-20080410
mjpegtools-1.9.0rc3p0-quicktime
mjpegtools-1.9.0rc3p0
mk-2.0p0
mldonkey-2.9.1
mlterm-2.9.0p7
mod_auth_ldap-1.6.0p5
mod_auth_mysql-3.2p3
mod_auth_radius-1.5.7p4
mod_dav-