After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777914 - nm-online: zero timeout causes floating point error
nm-online: zero timeout causes floating point error
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.6.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-01-30 04:57 UTC by Mickaël Thomas
Modified: 2017-02-02 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mickaël Thomas 2017-01-30 04:57:50 UTC
$ nm-online -t 0
Floating point exception (core dumped)

Introduced in commit c5f17a97ea8e4cee85c93ee9cfa04057f83e13ab

Thread 1 "nm-online" received signal SIGFPE, Arithmetic exception.
0x0000000000401574 in handle_timeout (user_data=0x7fffffffd830) at clients/nm-online.c:111
111                     progress_next_step_i = (elapsed_ms / data->progress_step_duration) + 1;
Comment 2 Mickaël Thomas 2017-01-31 16:54:13 UTC
Thanks for the fix

However, there is a regression with the exit code when the connection is already established:

$ nm-online -t 0 ; echo $? 
# 0 with nm-1.4.4
# 1 with master
Comment 3 Thomas Haller 2017-01-31 22:45:25 UTC
I see. It's quite messed up :(
Fix follows.