summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-20check ep during compaction because it can be nullAaron Patterson
This commit adds a check on the ep just like in the mark function. The env can contain null bytes if allocation tracing is enabled. We're seeing errors during autocompaction like this: ``` (lldb) bt 40 * thread #1, name = 'ruby', stop reason = signal SIGABRT frame #0: 0x00007f7d64b6018b libc.so.6`raise + 203 frame #1: 0x00007f7d64b3f859 libc.so.6`abort + 299 frame #2: 0x000055af5f2fefc9 ruby`die at error.c:764:5 frame #3: 0x000055af5f2ff1ac ruby`rb_bug_for_fatal_signal(default_sighandler=0x0000000000000000, sig=11, ctx=0x000055af60bc3340, fmt="") at error.c:804:5 frame #4: 0x000055af5f4bd08f ruby`sigsegv(sig=11, info=0x000055af60bc3470, ctx=0x000055af60bc3340) at signal.c:960:5 frame #5: 0x00007f7d64ebe3c0 libpthread.so.0`__restore_rt frame #6: 0x000055af5f339b0a ruby`gc_ref_update_imemo(objspace=0x000055af60b2b040, obj=0x00007f7d5b513fd0) at gc.c:9046:13 frame #7: 0x000055af5f339172 ruby`gc_update_object_references(objspace=0x000055af60b2b040, obj=0x00007f7d5b513fd0) at gc.c:9307:9 frame #8: 0x000055af5f338e79 ruby`gc_ref_update(vstart=0x00007f7d5b510010, vend=0x00007f7d5b513ff8, stride=40, objspace=0x000055af60b2b040, page=0x000055af62577aa0) at gc.c:9452:21 frame #9: 0x000055af5f337846 ruby`gc_update_references(objspace=0x000055af60b2b040, heap=0x000055af60b2b068) at gc.c:9481:9 frame #10: 0x000055af5f336569 ruby`gc_compact_finish(objspace=0x000055af60b2b040, heap=0x000055af60b2b068) at gc.c:4840:5 frame #11: 0x000055af5f335efb ruby`gc_page_sweep(objspace=0x000055af60b2b040, heap=0x000055af60b2b068, sweep_page=0x000055af63a1eb30) at gc.c:5046:13 frame #12: 0x000055af5f3355c5 ruby`gc_sweep_step(objspace=0x000055af60b2b040, heap=0x000055af60b2b068) at gc.c:5214:19 frame #13: 0x000055af5f33daf6 ruby`gc_sweep_rest(objspace=0x000055af60b2b040) at gc.c:5271:2 frame #14: 0x000055af5f33cacd ruby`gc_sweep(objspace=0x000055af60b2b040) at gc.c:5389:2 frame #15: 0x000055af5f33c21d ruby`gc_marks_rest(objspace=0x000055af60b2b040) at gc.c:7555:5 frame #16: 0x000055af5f324d41 ruby`gc_rest(objspace=0x000055af60b2b040) at gc.c:8457:13 frame #17: 0x000055af5f3297d8 ruby`garbage_collect(objspace=0x000055af60b2b040, reason=45568) at gc.c:8318:9 frame #18: 0x000055af5f344ece ruby`garbage_collect_with_gvl(objspace=0x000055af60b2b040, reason=45568) at gc.c:8632:9 frame #19: 0x000055af5f344e61 ruby`objspace_malloc_gc_stress(objspace=0x000055af60b2b040) at gc.c:10592:9 frame #20: 0x000055af5f32ced1 ruby`objspace_xmalloc0(objspace=0x000055af60b2b040, size=64) at gc.c:10767:5 frame #21: 0x000055af5f32ce11 ruby`ruby_xmalloc0(size=64) at gc.c:10988:12 frame #22: 0x000055af5f32cdac ruby`ruby_xmalloc_body(size=64) at gc.c:10997:12 frame #23: 0x000055af5f329415 ruby`ruby_xmalloc(size=64) at gc.c:12942:12 frame #24: 0x00007f7d611c4fe5 objspace.so`newobj_i(tpval=0x00007f7d5b553770, data=0x000055af639031a0) at object_tracing.c:101:35 frame #25: 0x000055af5f5b283f ruby`tp_call_trace(tpval=0x00007f7d5b553770, trace_arg=0x00007fff1016d398) at vm_trace.c:1115:2 frame #26: 0x000055af5f5b50ec ruby`exec_hooks_body(ec=0x000055af60b2b700, list=0x000055af60b2b920, trace_arg=0x00007fff1016d398) at vm_trace.c:304:3 frame #27: 0x000055af5f5b0f24 ruby`exec_hooks_unprotected(ec=0x000055af60b2b700, list=0x000055af60b2b920, trace_arg=0x00007fff1016d398) at vm_trace.c:333:5 frame #28: 0x000055af5f5b0da8 ruby`rb_exec_event_hooks(trace_arg=0x00007fff1016d398, hooks=0x000055af60b2b920, pop_p=0) at vm_trace.c:378:13 frame #29: 0x000055af5f33f8e2 ruby`rb_exec_event_hook_orig(ec=0x000055af60b2b700, hooks=0x000055af60b2b920, flag=1048576, self=0x00007f7d5b5c08c0, id=0, called_id=0, klass=0x0000000000000000, data=0x00007f7d5b513fd0, pop_p=0) at vm_core.h:1989:5 frame #30: 0x000055af5f334975 ruby`gc_event_hook_body(ec=0x000055af60b2b700, objspace=0x000055af60b2b040, event=1048576, data=0x00007f7d5b513fd0) at gc.c:2083:5 * frame #31: 0x000055af5f3342df ruby`newobj_slowpath_wb_protected [inlined] newobj_slowpath(klass=0x00007f7d5b9d19c8, flags=0x000000000000001a, objspace=0x000055af60b2b040, cr=0x000055af60b2b910, wb_protected=1) at gc.c:2284:9 frame #32: 0x000055af5f33410f ruby`newobj_slowpath_wb_protected(klass=0x00007f7d5b9d19c8, flags=0x000000000000001a, objspace=0x000055af60b2b040, cr=0x000055af60b2b910) at gc.c:2299 frame #33: 0x000055af5f333de9 ruby`newobj_of0(klass=0x00007f7d5b9d19c8, flags=0x000000000000001a, wb_protected=1, cr=0x000055af60b2b910) at gc.c:2338:11 frame #34: 0x000055af5f3227ae ruby`newobj_of(klass=0x00007f7d5b9d19c8, flags=0x000000000000001a, v1=0x000055af657d88a0, v2=0x000055af657d8890, v3=0x0000000000000000, wb_protected=1) at gc.c:2348:17 frame #35: 0x000055af5f322c5b ruby`rb_imemo_new(type=imemo_env, v1=0x000055af657d88a0, v2=0x000055af657d8890, v3=0x0000000000000000, v0=0x00007f7d5b9d19c8) at gc.c:2434:12 frame #36: 0x000055af5f5a3925 ruby`vm_env_new(env_ep=0x000055af657d88a0, env_body=0x000055af657d8890, env_size=4, iseq=0x00007f7d5b9d19c8) at vm_core.h:1363:33 frame #37: 0x000055af5f5a3808 ruby`vm_make_env_each(ec=0x000055af60b2b700, cfp=0x00007f7d6482fc90) at vm.c:801:11 frame #38: 0x000055af5f5a368d ruby`vm_make_env_each(ec=0x000055af60b2b700, cfp=0x00007f7d6482fc20) at vm.c:752:13 frame #39: 0x000055af5f5a368d ruby`vm_make_env_each(ec=0x000055af60b2b700, cfp=0x00007f7d6482fbb0) at vm.c:752:13 (lldb) f 31 frame #31: 0x000055af5f3342df ruby`newobj_slowpath_wb_protected [inlined] newobj_slowpath(klass=0x00007f7d5b9d19c8, flags=0x000000000000001a, objspace=0x000055af60b2b040, cr=0x000055af60b2b910, wb_protected=1) at gc.c:2284:9 2281 } 2282 GC_ASSERT(obj != 0); 2283 newobj_init(klass, flags, wb_protected, objspace, obj); -> 2284 gc_event_hook_prep(objspace, RUBY_INTERNAL_EVENT_NEWOBJ, obj, newobj_fill(obj, 0, 0, 0)); 2285 } 2286 RB_VM_LOCK_LEAVE_CR_LEV(cr, &lev); 2287 (lldb) p obj (VALUE) $3 = 0x00007f7d5b513fd0 (lldb) f 6 frame #6: 0x000055af5f339b0a ruby`gc_ref_update_imemo(objspace=0x000055af60b2b040, obj=0x00007f7d5b513fd0) at gc.c:9046:13 9043 { 9044 rb_env_t *env = (rb_env_t *)obj; 9045 TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, env->iseq); -> 9046 UPDATE_IF_MOVED(objspace, env->ep[VM_ENV_DATA_INDEX_ENV]); 9047 gc_update_values(objspace, (long)env->env_size, (VALUE *)env->env); 9048 } 9049 break; (lldb) p obj (VALUE) $4 = 0x00007f7d5b513fd0 (lldb) ``` Notes: Merged: https://github.com/ruby/ruby/pull/4392
2021-04-20[ruby/zlib] gemspec: Remove unused filesOlle Jonsson
Remove the list of executables. https://github.com/ruby/zlib/commit/6a70725b8e
2021-04-20[ruby/gdbm] gemspec: Set executables to the empty listOlle Jonsson
This gem exposes zero executables. https://github.com/ruby/gdbm/commit/d51cf47f65
2021-04-20[ruby/dbm] gemspec: add README & LICENSEOlle Jonsson
https://github.com/ruby/dbm/commit/c86b94b781
2021-04-20[ruby/logger] Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/logger/commit/4fa0c28e00
2021-04-20[ruby/date] Bump version to 3.1.1Hiroshi SHIBATA
https://github.com/ruby/date/commit/e574cc9048
2021-04-20* 2021-04-20 [ci skip]git
2021-04-20Update bundled_gemsKazuhiro NISHIYAMA
2021-04-19Try to fix other failures of writing XDG_CONFIG_HOMEKazuhiro NISHIYAMA
https://github.com/ruby/actions/actions/runs/756591173 https://github.com/ruby/actions/actions/runs/759073690 https://github.com/ruby/actions/actions/runs/761341026 ``` Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb ```
2021-04-19Added the specific files to the default gems like net-http and optparseHiroshi SHIBATA
2021-04-19* 2021-04-19 [ci skip]git
2021-04-19Fix the wrong file detection for net-*.gemspecHiroshi SHIBATA
[Bug #17476][ruby-core:101724]
2021-04-18* 2021-04-18 [ci skip]git
2021-04-18Split revision.h ruleNobuyoshi Nakada
GNU-make specific rule is defined in defs/gmake.mk.
2021-04-17Remove comments in tool/m4 from the generated configureNobuyoshi Nakada
2021-04-17Prefer positive condition to double negativeNobuyoshi Nakada
Autoconf 2.70 seems to omit the check for the given CC, `AC_COMPILE_IFELSE` does not know which is the cause of the failure.
2021-04-17* 2021-04-17 [ci skip]git
2021-04-17Fix writing XDG_CONFIG_HOME in test-bundlerKazuhiro NISHIYAMA
https://github.com/ruby/actions/actions/runs/756591173 ``` Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb ```
2021-04-16NEWS for [Feature #15198] [ci skip]Nobuyoshi Nakada
2021-04-16Add Array#intersect?Travis Hunter
Notes: Merged: https://github.com/ruby/ruby/pull/1972
2021-04-16rb_hash_free(): has never existed.卜部昌平
This is just a hoax. Nobody have ever implemented a function named as such. Also the functionality implied by the name must not be a public API if any.
2021-04-16* 2021-04-16 [ci skip]git
2021-04-16spec/ruby/core/hash/transform_keys_spec.rb: Fix the failure of ruby_3_0Yusuke Endoh
https://github.com/ruby/spec/pull/833 https://github.com/ruby/spec/commit/8290e5ad8952b14ee9a5069651d9864c66681112
2021-04-15Remove useless attribute set in init_mark_stackPeter Zhu
init_mark_stack already clears the mark stack so we do not need to set the attribute cache_size to zero. Notes: Merged: https://github.com/ruby/ruby/pull/4382
2021-04-15Workaround for installation failures on macOSNobuyoshi Nakada
2021-04-15Also merge tool/bundler/*.rb for testing of BundlerHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4383
2021-04-15Merge the master branch of RubyGemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4383
2021-04-15Merge the master branch of BundlerHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4383
2021-04-15Restore bundler.gemspec from ruby/ruby repository with sync_default_gems.rbHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4383
2021-04-15mkconfig.rb: Update around SDKROOTNobuyoshi Nakada
c.f. https://opensource.apple.com/source/ruby/ruby-145.40.1/patches/tool_mkconfig.rb.diff * moved to "includedir" from "oldincludedir". * honor "$(prefix)/include" if exists, otherwise fallback to `xcrun`.
2021-04-15spec/ruby/library/matrix/: Change the version guard to 3.1.0Yusuke Endoh
[Bug #17521] won't be backported until 3.1.0. https://github.com/ruby/spec/pull/832
2021-04-15[Doc] Add Hash#value? into call-seq (#4293)Kenichi Kamiya
Notes: Merged-By: zzak
2021-04-15* 2021-04-15 [ci skip]git
2021-04-14[ruby/matrix] Fix a typo in a error messageuniversato
2021-04-13Add RSymbol struct back into RVALUEPeter Zhu
Commit 0ca714fa1aa3fbe4fb60ae1e5b730e544dabc27b removed RSymbol from RVALUE. This commit adds RSymbol back into RVALUE. Notes: Merged: https://github.com/ruby/ruby/pull/4378
2021-04-13Inline LONG_LONG conversionsNobuyoshi Nakada
Not only NUM2LL, also LL2NUM, ULL2NUM and NUM2ULL.
2021-04-13workaround MSVC error卜部昌平
Previous code failed to compile on MSVC. Log: https://github.com/ruby/ruby/pull/4371/checks?check_run_id=2304484466 This is possibly due to the fact that: 1. `Data_Wrap_Struct(...)` appears in a source code 2. which expands to `rb_data_object_wrap(...)` 3. which expands to `RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)` 4. which expands to `rb_data_object_wrap_0` 5. which expands to `rb_data_object_wrap`, so far so good, but 6. this is a recursive macro expansion (see step 2). Everybody stops expanding... - in step 4 for MSVC, and - in step 5 for GCC etc. I have no idea why but this proposed changeset prevents MSVC from stopping at step 4.
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-04-13get rid of #pragma GCC diagnostic ignored "-Wundef"卜部昌平
Use of TOKEN_PASTE was a bad idea at the first place. Just use ## everywhere. Nobody practically lacks token pasting. Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-04-13* 2021-04-13 [ci skip]git
2021-04-13Make String#crypt ractor-safeNobuyoshi Nakada
2021-04-12Get rid of LONG_LONG redefinitionNobuyoshi Nakada
2021-04-12* 2021-04-12 [ci skip]git
2021-04-12Support non-standard `struct stat` [Bug #17793]Nobuyoshi Nakada
On 32-bit Android: * `st_dev`/`st_rdev` are not `dev_t` * `st_mode` is not `mode_t`
2021-04-11mkmf.rb: convert also arch_hdrdir [Bug #16651]Nobuyoshi Nakada
2021-04-11st.c: skip all deleted entries [Bug #17779]tompng (tomoya ishida)
Update the start entry skipping all already deleted entries. Fixes performance issue of `Hash#first` in a certain case.
2021-04-11[DOC] Adjusted spacing [ci skip]Nobuyoshi Nakada
2021-04-11sync_default_gems.rb: merge only files named as each gemNobuyoshi Nakada
2021-04-11sync_default_gems.rb: ignore rakelib [ci skip]Nobuyoshi Nakada
2021-04-11Revert "[ruby/optparse] No document in rakelib" [ci skip]Nobuyoshi Nakada
This reverts commit bd7430c7aacd135419609eec72e3889cd00a6f73. No rakelib in ruby itself.