aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Slimed down test runtime by stressing openssl.so only [Bug #16196]Nobuyoshi Nakada2019-10-101-2/+1
|
* forgot to delete unused #incude line卜部昌平2019-10-101-1/+0
|
* guard rb_fatal against non-GVL call卜部昌平2019-10-101-0/+8
| | | | | | Suggested by ko1. rb_fatal requires GVL so just in case one lacks, print that information and let the process die. As commented, we cannot print the given messages on such situations.
* make rb_raise a GVL-only function again卜部昌平2019-10-104-38/+52
| | | | | | Requested by ko1 that ability of calling rb_raise from anywhere outside of GVL is "too much". Give up that part, move the GVL aquisition routine into gc.c, and make our new gc_raise().
* add "[FATAL]" marker on abort卜部昌平2019-10-101-0/+1
| | | | Indicate that the situation is fatal.
* Remove unreachable step level `[ci skip]`Kazuhiro NISHIYAMA2019-10-103-5/+4
|
* Guard static variable firstNobuyoshi Nakada2019-10-102-1/+6
| | | | | | | * ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static variable to grab an internal object, before creating the object. otherwise the just-created object could get collected during the global variable list allocation. [Bug #16196]
* [rubygems/rubygems] Do not compare with unreliable Gem::Specification::TODAYNobuyoshi Nakada2019-10-101-15/+18
| | | | | | https://gist.github.com/ko1/a88834d744a0682711dab53fd9015a04#file-brlog-trunk-nopara-20191005-235153-L393-L472 https://github.com/rubygems/rubygems/commit/707408d8e7
* [rubygems/rubygems] Restrict possible date rangeNobuyoshi Nakada2019-10-101-2/+3
| | | | https://github.com/rubygems/rubygems/commit/1bd77f53df
* [rubygems/rubygems] Optimize Gem::Package::TarReader#eachJean Boussier2019-10-101-9/+15
| | | | https://github.com/rubygems/rubygems/commit/1de8f39ac4
* Now error.o needs thread.hNobuyoshi Nakada2019-10-101-0/+1
|
* Fixed numbered parameter checkNobuyoshi Nakada2019-10-102-23/+30
| | | | | | * parse.y (struct local_vars): moved numbered parameter NODEs for nesting check to separate per local variable scopes, as numbered parameters should belong to local variable scopes. [Bug #16248]
* negative_size_allocation_error never returnsNobuyoshi Nakada2019-10-101-1/+1
|
* allow rb_raise from outside of GVL卜部昌平2019-10-103-23/+46
| | | | | | | | | | | | | | | Now that allocation routines like ALLOC_N() can raise exceptions on integer overflows. This is a problem when the calling thread has no GVL. Memory allocations has been allowed without it, but can still fail. Let's just relax rb_raise's restriction so that we can call it with or without GVL. With GVL the behaviour is unchanged. With no GVL, wait for it. Also, integer overflows can theoretically occur during GC when we expand the object space. We cannot do so much then. Call rb_memerror and let that routine abort the process.
* lhs of pattern matching expression of should have a valueNobuyoshi Nakada2019-10-101-0/+1
|
* extracted declare_underNobuyoshi Nakada2019-10-101-8/+10
|
* Simplify rb_define_module_idAlan Wu2019-10-101-5/+1
|
* * 2019-10-10 [ci skip]git2019-10-101-1/+1
|
* fix memory corruption in old GCC卜部昌平2019-10-102-2/+1
| | | | | | | | This typo introduced memory corruption when __builtin_add_overflow is not available but uint128_t is. GCC before 5 are one of such situatins. See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-master/log/20191009T120004Z.log.html.gz
* Prefer st_is_member over st_lookup with 0Ben Woosley2019-10-096-8/+8
| | | | The st_is_member DEFINE has simpler semantics, for more readable code.
* Share ruby_sighandler_t definitionNobuyoshi Nakada2019-10-093-7/+3
|
* signal.c: save the original sighandlers for fatal signalsYusuke Endoh2019-10-093-13/+25
| | | | | | | | | | | On Android, a signal handler that is not SIG_DFL is set by default for SIGSEGV. Ruby's install_sighandler inserts Ruby's handler only when the signal has no handler, so it does not insert Ruby's SEGV report handler, which caused some test failures. This changeset forces to install Ruby's handler for some fatal signals (sigbus, sigsegv, and sigill). They keep the original handlers, and call them when the interpreter receives the signals.
* error.c (rb_bug_for_fatal_signal): renamed from rb_bug_contextYusuke Endoh2019-10-093-5/+5
| | | | | | | | | | Just refactoring. The name "rb_bug_context" is completely unclear for me. (Can you see that "context" means "machine register context"?) The context is available only when a fatal signal (sigbus, sigsegv, or sigill) is received; in fact, the function is used only for fatal signals. So, I think the name should be changed.
* signal.c (ruby_abort): move the definition for refactoringYusuke Endoh2019-10-091-18/+17
| | | | | | The three functions for fatal signals, sigbus, sigsegv, and sigill, are a family. The definition of ruby_abort had interrupted them for no reason. This change just moves the definition after the family.
* Check '[ci skip]' at job levelKazuhiro NISHIYAMA2019-10-093-0/+3
|
* vm_eval.c (rb_adjust_argv_kw_splat): avoid memcpy with zero lengthYusuke Endoh2019-10-091-1/+1
| | | | | | | | | A method call is often with `argc = 1` and `argv = &v` where v is a VALUE, and some functions shift the arguments by `argc-1` and `argv+1` (for example, rb_sym_proc_call). I'm unsure whether it is safe or not to pass a pointer `argv+1` to memcpy with zero length, but Coverity Scan complains it. So this attempts to suppress the warning by explicit check of the length.
* Remove uselsess shebangPavel Valena2019-10-091-1/+0
| | | as the file is not executable anyway.
* Update required_ruby_version to 2.4.0aycabta2019-10-091-1/+1
|
* Improve performance of Array#sum with float elements (#1555)Watson2019-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The declaration of local variable in loop, it will initialize local variable for each run of the loop with clang generated code. So, it shouldn't declare the local variable in heavy loop. Array#sum with float elements will be faster around 30%. * Before user system total real 3.320000 0.010000 3.330000 ( 3.336088) * After user system total real 2.590000 0.010000 2.600000 ( 2.602399) * Test code require 'benchmark' Benchmark.bmbm do |x| ary = [] 10000.times { ary << Random.rand } x.report do 50000.times do ary.sum end end end
* avoid returning NULL from xrealloc卜部昌平2019-10-091-2/+42
| | | | | | | | | | | | This changeset is to kill future possibility of bugs similar to CVE-2019-11932. The vulnerability occurs when reallocarray(3) (which is a variant of realloc(3) and roughly resembles our ruby_xmalloc2()) returns NULL. In our C API, ruby_xmalloc() never returns NULL to raise NoMemoryError instead. ruby_xfree() does not return NULL by definition. ruby_xrealloc() on the other hand, _did_ return NULL, _and_ also raised sometimes. It is very confusing. Let's not do that. x-series APIs shall raise on error and shall not return NULL.
* avoid overflow in integer multiplication卜部昌平2019-10-0912-49/+282
| | | | | | | This changeset basically replaces `ruby_xmalloc(x * y)` into `ruby_xmalloc2(x, y)`. Some convenient functions are also provided for instance `rb_xmalloc_mul_add(x, y, z)` which allocates x * y + z byes.
* annotate malloc-ish functions卜部昌平2019-10-092-4/+18
| | | | | Make them gcc friendly. Note that realloc canot be __malloc__ attributed, according to the GCC manual.
* fix arity mismatch卜部昌平2019-10-091-1/+1
| | | | Seems nobody has actually used this macro. Such an obvious typo.
* * 2019-10-09 [ci skip]git2019-10-091-1/+1
|
* lldb_cruby.py: fixed inspecting string [ci skip]Nobuyoshi Nakada2019-10-091-5/+2
| | | | | | | | | | | | Show the size of String. To see the whole contents even after NUL char: ``` (lldb) rp str (const char [5]) $1 = "x" (lldb) memory read -s1 --format x --count `sizeof($1)` -- &$1 0x1010457a8: 0x78 0x00 0x61 0x61 0x61 ```
* lldb_cruby.py: fixed embedded string ptr [ci skip]Nobuyoshi Nakada2019-10-091-1/+3
| | | | Use GetLocation to get the address of embedded array.
* Check for invalid hex escapes in URI#query=Jeremy Evans2019-10-082-0/+6
| | | | Fixes [Bug #11275]
* Packed delayed token elementsNobuyoshi Nakada2019-10-081-18/+20
|
* more use of RbConfig::LIMITS卜部昌平2019-10-082-5/+3
| | | | `8 * RbConfig::SIZEOF` ... is not straight.
* Import changes from ruby/bigdecimal (#2531)Kenta Murata2019-10-0811-98/+93
| | | Sync to ruby/bigdecimal@92356ba71c6bd325b0ab618c634a7aecf8cdc767
* Add section to extension.rdoc for backwards compatibility macros [ci skip]Jeremy Evans2019-10-071-0/+42
| | | | | | These macros should make it easier to C extensions to switch to the Ruby 2.7 C-API *_kw functions, but still have the code work correctly on older Ruby versions.
* Note RB_PASS_EMPTY_KEYWORDS and RB_SCAN_ARGS_EMPTY_KEYWORDS will be removedJeremy Evans2019-10-072-2/+4
| | | | | There is no need for these in Ruby 3.0, and the plan is to remove them.
* Update NEWS with Module#ruby2_keywords and a few other thingsJeremy Evans2019-10-071-0/+32
|
* Do not free too many pages.Aaron Patterson2019-10-071-1/+3
| | | | | Sweep step checks `heap_pages_freeable_pages`, so compaction should do the same.
* Move empty pages to the tombAaron Patterson2019-10-071-4/+9
| | | | | I think we need to be moving empty pages to the tomb after they become empty.
* Eliminate second GC pass for eliminating T_MOVEDAaron Patterson2019-10-071-10/+13
| | | | | `T_MOVED` is a linked list, so we can just iterate through the `T_MOVED` objects, clearing them out and adding them to respective free lists.
* * 2019-10-08 [ci skip]git2019-10-081-1/+1
|
* Fix typo [ci skip]Kazuhiro NISHIYAMA2019-10-081-2/+2
| | | | pointed out by ruby-trunk-changes
* Allow ruby2_keywords to be used with bmethodsJeremy Evans2019-10-072-10/+69
| | | | | | | | There are libraries that use define_method with argument splats where they would like to pass keywords through the method. To more easily allow such libraries to use ruby2_keywords to handle backwards compatibility, it is necessary for ruby2_keywords to support bmethods.
* Write yaml and json under destdir and print to stdoutKazuhiro NISHIYAMA2019-10-071-2/+10
|