Граф коммитов

52065 Коммитов

Автор SHA1 Сообщение Дата
shyouhei b120f5e38d avoid fork-unsafe arc4random implementations
Some old implementaions of arc4random_buf(3) were ARC4 based, or
unsafe when forked, or both.  Resort to /dev/urandom for those
known problematic cases.  Fix [Bug #15039]

Patch from Thomas Hurst <tom@hur.st>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04 01:42:37 +00:00
svn 183ac396d4 * 2018-09-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04 00:12:50 +00:00
nobu 6853c9e169 RubyGems installer.rb - fix up my mistakes in r64582
From: MSP-Greg <greg.mpls@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04 00:12:49 +00:00
kazu aa5d99280d Use unpack1 instead of unpack and `[0]`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-03 13:52:09 +00:00
nobu c115b39e03 Declare as gnu_printf on mingw
[Bug #13496]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-03 08:20:41 +00:00
svn 5cde9a39a3 * 2018-09-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02 23:27:09 +00:00
nobu 074f1c9133 Readline: expose rl_completion_quote_character variable
[Feature #13050]

From: georgebrock (George Brocklehurst) <ruby@georgebrock.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02 23:27:08 +00:00
svn f7717185c8 * 2018-09-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02 03:49:32 +00:00
nobu c8ccdbfe1e configure.ac: -fstack-protector-strong
* configure.ac: use -fstack-protector-strong if available instead of
  -fstack-protector conditionally.  [ruby-core:88788] [Misc #15053]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02 03:49:31 +00:00
nobu 929e9713bb complex.c: simplify division result
* complex.c (f_divide): canonicalize rationals to simplify integer
  complex results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 07:34:31 +00:00
kazu 9563db5eb1 Re-try to add workaround for warnings
```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:59:36 +00:00
nobu 480a21f435 RSTRING_PTR may not be terminated in the future
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:19:05 +00:00
nobu 8c90838f7c 10**3 is always 1000
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:14:07 +00:00
nobu dcd4914b3a adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:14:06 +00:00
nobu c4816a11e4 surround macro block with do/while
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 04:09:02 +00:00
kazu ba3da08596 [DOC] Add %Q and %+ to strptime [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 01:37:12 +00:00
kazu 0fc1870f23 Revert "Try to add workaround for warnings"
This reverts commit a5e5cfa3f650d4e78fb50e2df15c102ab56fca3c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 15:29:06 +00:00
kazu efa19f9f5a Try to add workaround for warnings
```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 15:25:52 +00:00
svn 50cb77f264 * 2018-09-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 15:05:32 +00:00
kazu c3e16351d4 [DOC] leap seconds [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 15:05:29 +00:00
nobu 68f9d7b444 random.c: SecRandomCopyBytes
* random.c (fill_random_bytes_syscall): use SecRandomCopyBytes in
  Security framework on macOS 10.7 or later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 09:56:24 +00:00
mame 070d731bdd test/lib/test/unit/assertions.rb: explicit delegation of keyword arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 04:31:45 +00:00
svn cec2138855 * 2018-08-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-30 19:14:38 +00:00
normal 13f4923551 cont.c (rb_fiber_atfork): th->root_fiber may not exist
Otherwise, bootstraptest/test_fork.rb fails with -DVM_CHECK_MODE=2

[Bug #15041]

Fixes: r64589 "cont.c: set th->root_fiber to current fiber at fork"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-30 19:14:37 +00:00
normal 3bcb4ff810 hrtime.h: fix typo in non-builtin overflow check
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-30 03:24:55 +00:00
svn 5ba404f4b0 * 2018-08-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29 19:47:15 +00:00
normal f1119509e6 test/ruby/test_io.rb (test_select_leak): use handle_interrupt
Interrupt timing is tricky and it's possible the target
thread is still stopped from the previous loop iteration.

[ruby-core:88732] [Bug #15043]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29 19:47:14 +00:00
normal ac543abe91 cont.c: set th->root_fiber to current fiber at fork
Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.

[ruby-core:88723] [Bug #15041]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29 08:04:09 +00:00
svn 43d3f813bc * 2018-08-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29 02:23:15 +00:00
normal 0b44744d46 cont.c (rb_context_t): remove ensure_list
It is unused (we use rb_execution_context_t.ensure_list instead)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29 02:23:14 +00:00
eregon 8867f285da Tag a couple specs failing on AIX
* The rest seems OS bugs, MRI bugs or incomplete IPv6 implementation:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180828T103302Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 14:55:33 +00:00
hsbt 8a9996493a Fixed installation failure with mswin environment.
[ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 13:42:39 +00:00
eregon d36cd0b04d Update to ruby/spec@6fd9472
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 09:41:26 +00:00
ko1 1f4efb9aed rest parameter optimization [Feature #15010]
* vm_args.c: rb_ary_dup(args->rest) to be used at most once during
  parameter setup. [Feature #15010]
  A patch by chopraanmol1 (Anmol Chopra) <chopraanmol1@gmail.com>.

* array.c (rb_ary_behead): added to remove first n elements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 07:06:06 +00:00
hsbt 715666cc28 Fixed test failures in mswin environment at r64555.
[ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 02:39:22 +00:00
normal 4d9c23772f thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document
`acquired' was an old boolean variable, but nowadays it is a
rb_thread_t pointer;  "gvl.owner" seems like a more appropriate
name.  And document the contended path including waitq, timer,
and timer_err.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28 00:24:08 +00:00
normal fcaf874585 thread_pthread.c: document sigwait_th and sigwait_fd [ci skip]
This is an important concept to document, I think.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 23:39:58 +00:00
normal 1b1274f728 thread_pthread.c: fix deadlock on test_thread.rb::test_signal_at_join
Fixes: r64575 ("avoid lock ping-pong in do_gvl_timer & ubf_select")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 23:29:44 +00:00
eregon 8500714adc Rewrite Etc.sysconf spec to allow nil or Integer for all variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 19:08:38 +00:00
normal e61e6ae587 process.c: fix potential missed wakeups in r64576
Oddly, all existing test cases passed multiple times
before this patch (even with --jit-wait), so this seems
like a difficult failure to prove.

Fixes: r64576 ("process.c: simplify SIGCHLD-based waitpid")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 18:37:04 +00:00
normal 9d4027b503 process.c: simplify SIGCHLD-based waitpid
Introduce a new rb_thread_sleep_interruptible that does not
execute interrupts before sleeping.  Skipping the interrupt
check before sleep is required for out-of-GVL ruby_waitpid_all
to function properly when setting waitpid_state.ret

Now that ubf_select can be called by the gvl.timer thread
without recursive locking gvl.lock, we can safely use
rb_threadptr_interrupt to deal with waking up sleeping
processes,

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 17:17:13 +00:00
normal 943bf37b10 thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_select
This simplifies the locking logic somewhat.

While we're at it, designate_timer_thread is worthless in
ubf_select because gvl_acquire_common already guarantees there
is a gvl.timer if gvl->waitq is populated.

In the future (for auto-fiber), this will allow using
th->unblock.func for rb_waitpid callers (via rb_sigchld_handler).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 17:17:08 +00:00
svn cda13d8c71 * 2018-08-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 16:38:38 +00:00
eregon 5ffa775fac SC_TZNAME_MAX can also be infinite
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 16:38:37 +00:00
svn 293ed16e64 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 16:22:22 +00:00
eregon 2dca35b9b1 Update to ruby/spec@007e908
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 16:22:21 +00:00
svn 58689fa747 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 14:49:57 +00:00
eregon 85d1a8ba3b Update to ruby/spec@a89819d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 14:49:56 +00:00
eregon 35f2b71ce9 Fix template/fake.rb.in if ENV["RUBYOPT"] is nil
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 14:33:10 +00:00
eregon 5e9cd5208e Fix template/fake.rb.in when external and internal encodings are set
* To be able to run spec/ruby/command_line/dash_encoding_spec.rb
  with the in-repo build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 14:25:14 +00:00