Bug #10144

[PATCH] time_timespec: fix tv_nsec overflow on float conversion

Added by Eric Wong 7 months ago. Updated 7 months ago.

[ruby-core:64407]
Status:Closed
Priority:Normal
Assignee:Eric Wong
ruby -v:trunk Backport:2.0.0: DONE, 2.1: DONE

Description

test/ruby/test_float.rb (test_sleep_with_Float) causes tv_nsec
to hit 1000000000 exactly. This bug is currently hidden from
our test by the platform-dependent native_cond_timeout
functions, but a future native_cond_timedwait implementation may
prefer relative timeouts to match ConditionVariable#wait
semantics more closely.

Requesting backport since this may affect 3rd party C extensions.

tv_nsec-overflow.patch Magnifier (426 Bytes) Eric Wong, 08/16/2014 01:19 AM

Associated revisions

Revision 47196
Added by normal 7 months ago

time.c (time_timespec): fix tv_nsec overflow

test/ruby/test_float.rb (test_sleep_with_Float) causes tv_nsec
to hit 1000000000 exactly. This bug is currently hidden from
our test by the platform-dependent native_cond_timeout
functions, but a future native_cond_timedwait implementation may
prefer relative timeouts to match ConditionVariable#wait
semantics more closely.
[Bug #10144]

Revision 47196
Added by normal 7 months ago

time.c (time_timespec): fix tv_nsec overflow

test/ruby/test_float.rb (test_sleep_with_Float) causes tv_nsec
to hit 1000000000 exactly. This bug is currently hidden from
our test by the platform-dependent native_cond_timeout
functions, but a future native_cond_timedwait implementation may
prefer relative timeouts to match ConditionVariable#wait
semantics more closely.
[Bug #10144]

Revision 47482
Added by Tomoyuki Chikanaga 7 months ago

merge revision(s) r47196: [Backport #10144]

* time.c (time_timespec): fix tv_nsec overflow
  [Bug #10144]

Revision 47501
Added by Usaku NAKAMURA 7 months ago

merge revision(s) 47196: [Backport #10144]

* time.c (time_timespec): fix tv_nsec overflow
  [Bug #10144]

History

#1 Updated by Anonymous 7 months ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Applied in changeset r47196.


time.c (time_timespec): fix tv_nsec overflow

test/ruby/test_float.rb (test_sleep_with_Float) causes tv_nsec
to hit 1000000000 exactly. This bug is currently hidden from
our test by the platform-dependent native_cond_timeout
functions, but a future native_cond_timedwait implementation may
prefer relative timeouts to match ConditionVariable#wait
semantics more closely.
[Bug #10144]

#2 Updated by Tomoyuki Chikanaga 7 months ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into ruby_2_1 branch at r47482.

#3 Updated by Usaku NAKAMURA 7 months ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into ruby_2_0_0 at r47501.

Also available in: Atom PDF