summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-14Fixed overflow at onig_region_setNobuyoshi Nakada
To get rid of a bug of `onig_region_set` which takes `int`s instead of `OnigPosition`s, set elements of `beg` and `end` members directly, for the time being.
2019-10-14Fix some DRb issues (#2552)Jeremy Evans
* Handle BasicObject in drb Also fix a bug in rescue clause of any_to_s because sprintf does not handle the %l modifier. Fixes [Bug #7833] * Do not send a reply to the client if there is a connection error This allows for normal TCP shutdown (fin-ack-fin-ack instead of fin-ack-push-rst). Patch from pierre@mouraf.org (Pierre-Alexandre Meyer). Fixes [Bug #2339] * Detect fork and do not reuse forked connections in drb This associates each DRbConn with a pid, and if the pid changes, it closes any DRbConns in the pool with a pid that no longer matches. This fixes DRb servers from sending messages intended for one client to another client after forking. Fixes [Bug #2718] Fixes [Bug #14471]
2019-10-14Import StringScanner 1.0.3 (#2553)Sutou Kouhei
Notes: Merged-By: kou <kou@clear-code.com>
2019-10-13Eliminate the possibility to leave freed ISeqTakashi Kokubun
in active_units Hoping to fix: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2311375
2019-10-13Delay the free until we stop referring to a unitTakashi Kokubun
`if (unit->iseq)` might have referred to a freed unit. Therefore this commit delays its free.
2019-10-14* 2019-10-14 [ci skip]git
2019-10-13Remove the quick stop path after convert_unit_to_funcTakashi Kokubun
Now I'm not exactly sure why I needed to check `stop_worker_p` after `mjit_copy_cache_from_main_thread` of `convert_unit_to_func` in 4161674b2fbea6bdd01783ac5d3b39d88db22972. If it's for avoiding deadlock under `in_gc` condition, we should keep it. However, if it's not the case and it's just for retrying accidental compilation failure or just to avoid `MJIT_ATOMIC_SET` and `compact_all_jit_code`, I think this quick stop path is not mandatory. Because this path is somewhat problematic in my upcoming fix in mjit_worker, let me try to remove this first and see how CI goes.
2019-10-13Enhance doc for ENV.deleteBurdette Lamar
Notes: Merged: https://github.com/ruby/ruby/pull/2542
2019-10-13* 2019-10-13 [ci skip]git
2019-10-13dir.c (join_path_from_pattern): check NULL from mallocYusuke Endoh
Coverity Scan points out that all the return values of GLOB_ALLOC_N are NULL-checked except this call.
2019-10-13io.c (rb_update_max_fd): fail with a negative file descripterYusuke Endoh
Coverity Scan points out that ext/socket/unixsocket.c may pass -1 to rb_update_max_fd. I'm unsure whether it can happen actually or not, but it would be good for the function to reject a negative value.
2019-10-12re.c (match_set_string): add a check for memory allocationYusuke Endoh
Found by Coverity Scan
2019-10-12Also moved fallback definition of __has_attributeNobuyoshi Nakada
2019-10-12missing/setproctitle.c: remove nonsense NULL checkYusuke Endoh
If fmt is NULL, ptitle is uninitialized and used. SETPROCTITLE(3bsd) says "If fmt is NULL, the process title is restored", but looks like the feature is not implemented in missing/setproctitle.c. At least the source code of ruby does not pass NULL to the function. So I assume this function requires non-NULL fmt. This issue was found by Coverity Scan.
2019-10-12Suppress deprecation warnings of MD5 from Xcode 11.1Nobuyoshi Nakada
2019-10-12Suppress "clobbered" warnings by gcc 9.2.0Nobuyoshi Nakada
2019-10-12Moved RB_METHOD_DEFINITION_DECL to intern.hNobuyoshi Nakada
This macro is used here before defined in ruby.h.
2019-10-12atime may not updated unless strictatime is set on macOS CatalinaNobuyoshi Nakada
Cited from mount(8): ``` strictatime Always update the file access time when reading from a file. Without this option the filesystem may default to a less strict update mode, where some access time updates are skipped for performance reasons. This option could be ignored if it is not supported by the filesystem. ```
2019-10-12Import CSV 3.1.2 (#2547)Sutou Kouhei
Notes: Merged-By: kou <kou@clear-code.com>
2019-10-12Use `warn` with `uplevel:` instead of `caller`Kazuhiro NISHIYAMA
2019-10-12* 2019-10-12 [ci skip]git
2019-10-12Import REXML 3.2.3 (#2548)Sutou Kouhei
Notes: Merged-By: kou <kou@clear-code.com>
2019-10-11io.c (NUM2IOCTLREQ): Accept a value more than INT_MAXYusuke Endoh
ioctl accepts int as request arguments on some platforms, but some requests are more than INT_MAX, e.g., RNDGETENTCNT(0x80045200). Passing (0x80045200 | (-1 << 32)) may work around the issue, but it may not work on a platform where ioctl accepts unsigned long. So this change uses NUM2LONG and then casts it to int.
2019-10-11test/ruby/test_rubyoptions.rb (test_encoding): skipped on AndroidYusuke Endoh
On Android, nl_langinfo() always returns UTF-8 even when LANG is C.
2019-10-11test/test_syslog.rb (test_log): skipped on AndroidYusuke Endoh
On Android 28, LOG_PERROR is defined, but not implemented yet. This change skips Syslog#log explicitly.
2019-10-11Use `bind_call` instead of `bind` and `call`Kazuhiro NISHIYAMA
2019-10-11win32.c: Remove unused calls to StartSockets (#2312)Gabriel Nagy
NtSocketsInitialized behavior changed in e33b1690, requiring a call to rb_w32_sysinit for starting Windows Sockets. This commit removes NtSocketsInitialized entirely to avoid confusion. Signed-off-by: Gabriel Nagy <gabriel.nagy@puppet.com>
2019-10-11Module#define_method: Add UnboundMethod to expected classesksss
Notes: Merged: https://github.com/ruby/ruby/pull/1465
2019-10-11Reduce the minimum string buffer size from 127 to 63 bytesLourens Naudé
Notes: Merged: https://github.com/ruby/ruby/pull/2151
2019-10-11Right size the numtable in insn_make_insn_table to VM_INSTRUCTION_SIZELourens Naudé
Notes: Merged: https://github.com/ruby/ruby/pull/2447
2019-10-11set real path to __FILE__ and __dir__ in Binding#irbtakkanm
When reading Binding#irb, the file of the calling source is reflected in __FILE__ and __dir__. Notes: Merged: https://github.com/ruby/ruby/pull/1896
2019-10-10Document the difference between expressions and statements [ci skip]Jeremy Evans
In the grammar, all expressions are statements, but not all statements are expressions. Some parts of the grammar accept expressions and not other types of statements, which causes similar looking code to parse differently due to operator precedence. Mostly from Dan0042 (Daniel DeLorme). Fixes [Bug #16092]
2019-10-11* 2019-10-11 [ci skip]git
2019-10-10Support delegates for BasicObjectJeremy Evans
For BasicObject, bind the Kernel respond_to? instance method to the object and call it instead of calling the method directly. Also, use bind_call(recv, ...) for better performance. Fixes [Bug #16127] Notes: Merged: https://github.com/ruby/ruby/pull/2546
2019-10-10mjit_worker.c: Add `-lm` to the C compiler in MJIT on AndroidYusuke Endoh
To avoid: cannot locate symbol "modf" referenced by .../_ruby_mjit_XXX.so"
2019-10-10ext/syslog/extconf.rb: add -llog for AndroidYusuke Endoh
Otherwise, requiring syslog results in: cannot locate symbol "__android_log_print" referenced by "syslog.so"
2019-10-10test/ruby/test_file_exhaustive.rb: check the owner of the root directoryYusuke Endoh
The root directory may be owned by the current user, for example, in chroot environment.
2019-10-10Skip very time consuming test [Bug #16196]Nobuyoshi Nakada
2019-10-10Prefer rb_gc_register_mark_objectNobuyoshi Nakada
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer `rb_gc_register_mark_object`, which is better for constant objects, over `rb_gc_register_address` for global/static variables which can be re-assigned at runtime. [Bug #16196]
2019-10-10Slimed down test runtime by stressing openssl.so only [Bug #16196]Nobuyoshi Nakada
2019-10-10forgot to delete unused #incude line卜部昌平
2019-10-10guard rb_fatal against non-GVL call卜部昌平
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.
2019-10-10make rb_raise a GVL-only function again卜部昌平
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().
2019-10-10add "[FATAL]" marker on abort卜部昌平
Indicate that the situation is fatal.
2019-10-10Remove unreachable step level `[ci skip]`Kazuhiro NISHIYAMA
2019-10-10Guard static variable firstNobuyoshi Nakada
* 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]
2019-10-10[rubygems/rubygems] Do not compare with unreliable Gem::Specification::TODAYNobuyoshi Nakada
https://gist.github.com/ko1/a88834d744a0682711dab53fd9015a04#file-brlog-trunk-nopara-20191005-235153-L393-L472 https://github.com/rubygems/rubygems/commit/707408d8e7
2019-10-10[rubygems/rubygems] Restrict possible date rangeNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/1bd77f53df
2019-10-10[rubygems/rubygems] Optimize Gem::Package::TarReader#eachJean Boussier
https://github.com/rubygems/rubygems/commit/1de8f39ac4
2019-10-10Now error.o needs thread.hNobuyoshi Nakada