This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/1012] New: gethostid() output sign-extended on 64-bit platforms
- From: "edwardsg at sgi dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 15 Jun 2005 18:11:08 -0000
- Subject: [Bug libc/1012] New: gethostid() output sign-extended on 64-bit platforms
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
There is a signed int to signed long bug in gethostid() for 64-bit
platforms. If the 31st bit of the hostid is a 1, it gets signed
extended to 64 bits. It should instead be cast as an unsigned int on
return. Example:
# hostid
ffffffffa2802df3
With the attached patch, it returns to the expected output:
# hostid
a2802df3
--
Summary: gethostid() output sign-extended on 64-bit platforms
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: edwardsg at sgi dot com
CC: drepper at redhat dot com,glibc-bugs at sources dot
redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1012
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.