[Bug 1016349] Re: htons() returns wrong type on non-{i386, amd64} platforms
Bug Watch Updater
1016349 at bugs.launchpad.net
Sat Oct 28 06:34:50 UTC 2017
Launchpad has imported 4 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=834447.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2012-06-21T21:54:09+00:00 Alex wrote:
glibc fixed a bug in 2010 in which htons() would give a conversion
warning when compiled with -Wconversion due to the implementation of the
byte-swapping functions. Unfortunately, this fix was only for x86/x86_64
platforms. The fix has now been updated to include the generic byteswap
functions.
Please apply this patch to the glibc in Fedora.
For reference, please see
http://sourceware.org/bugzilla/show_bug.cgi?id=12194
Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/5
------------------------------------------------------------------------
On 2012-06-21T22:02:51+00:00 Alex wrote:
*** Bug 834449 has been marked as a duplicate of this bug. ***
Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/6
------------------------------------------------------------------------
On 2012-06-21T22:09:52+00:00 Alex wrote:
*** Bug 834450 has been marked as a duplicate of this bug. ***
Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/7
------------------------------------------------------------------------
On 2012-06-21T23:29:54+00:00 Jeff wrote:
I just resynced with the upstream sources which include a fix for this
problem.
Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/8
** Changed in: glibc (Fedora)
Status: Unknown => Fix Released
** Changed in: glibc (Fedora)
Importance: Unknown => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/1016349
Title:
htons() returns wrong type on non-{i386,amd64} platforms
Status in eglibc:
Fix Released
Status in eglibc package in Ubuntu:
Fix Released
Status in eglibc source package in Precise:
Fix Released
Status in glibc package in Fedora:
Fix Released
Bug description:
[Impact]
htons() on non x86 platforms is missing a cast to uint16_t which causes FTBFS of mosh on armel and armhf.
[Development Fix]
This has been fixed in eglibc in Quantal.
[Stable Fix]
A fix can be backported from the Quantal development version into Precise.
[Test Case]
See https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1016349/comments/2
On how to reproduce with a C program.
[Regression Potential]
This patch affects some of the generic byteswaping code in eglibc. The fix for x86 arches was already completed years ago, and this patch fixes is for other arches.
--
The definition of htons() on platforms other than i386 and amd64 is
missing a cast to uint16_t, which caused this FTBFS of mosh on armel
and armhf:
https://launchpad.net/ubuntu/+source/mosh/1.2.1-1ubuntu1/+build/3582950
network.cc:76:28: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
network.cc:76:50: error: narrowing conversion of '({...})' from 'unsigned int' to 'uint16_t {aka short unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing]
(We didn’t see this before because this warning is new in GCC 4.7.)
This was fixed for glibc 2.16 in
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2174c6dd8555f654c30df2f8f3321b69e0f736f8
To manage notifications about this bug go to:
https://bugs.launchpad.net/eglibc/+bug/1016349/+subscriptions
More information about the foundations-bugs
mailing list