aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge bundler-2.2.0.rc.2Hiroshi SHIBATA2020-10-15200-3672/+1058
|
* Check encoding name to replicateNobuyoshi Nakada2020-10-153-17/+37
| | | | https://hackerone.com/reports/954433
* Merge rubygems-3.2.0.rc.2Hiroshi SHIBATA2020-10-159-38/+34
|
* * 2020-10-15 [ci skip]git2020-10-151-1/+1
|
* Mostly recover a Ruby stack trace from a core fileAaron Patterson2020-10-141-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the lldb script so it can mostly recover a Ruby stack trace from a core file. It's still missing line numbers and dealing with CFUNCs, but you use it like this: ``` (lldb) rbbt ec rb_control_frame_t TYPE 0x7f6fd6555fa0 EVAL ./bootstraptest/runner.rb error!! 0x7f6fd6555f68 METHOD ./bootstraptest/runner.rb main 0x7f6fd6555f30 METHOD ./bootstraptest/runner.rb in_temporary_working_directory 0x7f6fd6555ef8 METHOD /home/aaron/git/ruby/lib/tmpdir.rb mktmpdir 0x7f6fd6555ec0 BLOCK ./bootstraptest/runner.rb block in in_temporary_working_directory 0x7f6fd6555e88 CFUNC 0x7f6fd6555e50 BLOCK ./bootstraptest/runner.rb block (2 levels) in in_temporary_working_directory 0x7f6fd6555e18 BLOCK ./bootstraptest/runner.rb block in main 0x7f6fd6555de0 METHOD ./bootstraptest/runner.rb exec_test 0x7f6fd6555da8 CFUNC 0x7f6fd6555d70 BLOCK ./bootstraptest/runner.rb block in exec_test 0x7f6fd6555d38 CFUNC 0x7f6fd6555d00 TOP /home/aaron/git/ruby/bootstraptest/test_insns.rb error!! 0x7f6fd6555cc8 CFUNC 0x7f6fd6555c90 BLOCK /home/aaron/git/ruby/bootstraptest/test_insns.rb block in <top (required)> 0x7f6fd6555c58 METHOD ./bootstraptest/runner.rb assert_equal 0x7f6fd6555c20 METHOD ./bootstraptest/runner.rb assert_check 0x7f6fd6555be8 METHOD ./bootstraptest/runner.rb show_progress 0x7f6fd6555bb0 METHOD ./bootstraptest/runner.rb with_stderr 0x7f6fd6555b78 BLOCK ./bootstraptest/runner.rb block in show_progress 0x7f6fd6555b40 BLOCK ./bootstraptest/runner.rb block in assert_check 0x7f6fd6555b08 METHOD ./bootstraptest/runner.rb get_result_string 0x7f6fd6555ad0 METHOD ./bootstraptest/runner.rb make_srcfile 0x7f6fd6555a98 CFUNC 0x7f6fd6555a60 BLOCK ./bootstraptest/runner.rb block in make_srcfile ``` Getting the main execution context is difficult (it is stored in a thread local) so for now you must supply an ec and this will make a backtrace
* remove uneffective testKoichi Sasada2020-10-141-25/+0
| | | | | RubyVM.stat[:global_method_state] is no longer available so this test doesn't check any more.
* ruby_vm_global_method_state is no longer needed.Koichi Sasada2020-10-143-11/+4
| | | | Now ruby_vm_global_method_state is not used so let's remove it.
* sync generic_ivtblKoichi Sasada2020-10-146-18/+54
| | | | | | | | | generic_ivtbl is a process global table to maintain instance variables for non T_OBJECT/T_CLASS/... objects. So we need to protect them for multi-Ractor exection. Hint: we can make them Ractor local for unshareable objects, but now it is premature optimization.
* fix releasing timing.Koichi Sasada2020-10-143-27/+30
| | | | | | | (1) recorded_lock_rec > current_lock_rec should not be occurred on rb_ec_vm_lock_rec_release(). (2) should be release VM lock at EXEC_TAG(), not POP_TAG(). (3) some refactoring.
* Remove duplicated line [ci skip]Kazuhiro NISHIYAMA2020-10-141-1/+0
| | | | ref bf3b2a43741e4f72be21bc6acf24d37e7fcff61c
* Promote pathname to default gemsHiroshi SHIBATA2020-10-144-3/+36
|
* Promote drb to the default gemsHiroshi SHIBATA2020-10-145-3/+38
|
* freeze Encoding objectsKoichi Sasada2020-10-141-1/+4
| | | | | | Encoding objects can be accessed in multi-ractors and there is no state to mutate. So we can mark it as frozen and shareable. [Bug #17188]
* sync enc_table and rb_encoding_listKoichi Sasada2020-10-143-174/+389
| | | | | | | | | | | | | | | | | enc_table which manages Encoding information. rb_encoding_list also manages Encoding objects. Both are accessed/modified by ractors simultaneously so that they should be synchronized. For enc_table, this patch introduced GLOBAL_ENC_TABLE_ENTER/LEAVE/EVAL to access this table with VM lock. To make shortcut, three new global variables global_enc_ascii, global_enc_utf_8, global_enc_us_ascii are also introduced. For rb_encoding_list, we split it to rb_default_encoding_list (256 entries) and rb_additional_encoding_list. rb_default_encoding_list is fixed sized Array so we don't need to synchronized (and most of apps only needs it). To manage 257 or more encoding objects, they are stored into rb_additional_encoding_list. To access rb_additional_encoding_list., VM lock is needed.
* support exception when lock_rec > 0Koichi Sasada2020-10-143-1/+49
| | | | | | If a ractor getting a VM lock (monitor) raises an exception, unlock can be skipped. To release VM lock correctly on exception (or other jumps with JUMP_TAG), EC_POP_TAG() releases VM lock.
* * 2020-10-14 [ci skip]git2020-10-141-1/+1
|
* remove useless semicolonsKoichi Sasada2020-10-141-2/+2
|
* Use %VCVARS%Nobuyoshi Nakada2020-10-131-3/+4
|
* * 2020-10-13 [ci skip]git2020-10-131-1/+1
|
* test/ruby/test_fiber.rb: Suppress "assigned but unused variable" warningsYusuke Endoh2020-10-131-4/+2
|
* spec/ruby/library/socket/socket/listen_spec.rb: Allow both EACCES and EOPNOSUPPYusuke Endoh2020-10-121-2/+2
| | | | on Android
* relax Fiber#transfer's restrictionKoichi Sasada2020-10-127-89/+267
| | | | | | | | | | | | | | | | | | | | | | | | | Using Fiber#transfer with Fiber#resume for a same Fiber is limited (once Fiber#transfer is called for a fiber, the fiber can not be resumed more). This restriction was introduced to protect the resume/yield chain, but we realized that it is too much to protect the chain. Instead of the current restriction, we introduce some other protections. (1) can not transfer to the resuming fiber. (2) can not transfer to the yielding fiber. (3) can not resume transferred fiber. (4) can not yield from not-resumed fiber. [Bug #17221] Also at the end of a transferred fiber, it had continued on root fiber. However, if the root fiber resumed a fiber (and that fiber can resumed another fiber), this behavior also breaks the resume/yield chain. So at the end of a transferred fiber, switch to the edge of resume chain from root fiber. For example, root fiber resumed f1 and f1 resumed f2, transferred to f3 and f3 terminated, then continue from the fiber f2 (it was continued from root fiber without this patch).
* Make the test suite pass on real Android/Termux environmentYusuke Endoh2020-10-127-9/+44
| | | | Attempting to create a hard link raises EACCES
* [ci skip] Minor documentation fix.Cristian Greco2020-10-121-1/+1
| | | Add missing period.
* change rb_ractor_queue to ring buffertompng2020-10-122-9/+12
|
* ractor.rb - indent comment code [ci skip]MSP-Greg2020-10-121-26/+26
|
* bignum.c (bary_sparse_p): do not comsume Random::DEFAULTYusuke Endoh2020-10-121-3/+3
| | | | | | | | | | | It uses random to determine if the bignum is sparse or not. It is arguable if three-digit samples are enough or not to determine it, but anyway, consuming Random source implicitly is not good. I introduced the random sampling mechanism, and I don't know any significant reason to do so. So, let's remove it. This change makes the sampling points fixed: 40th, 50th, and 60th percentiles.
* bignum.c (rb_int_powm): Integer#pow(0, 1) should return 0Yusuke Endoh2020-10-122-0/+22
| | | | ... instead of 1 because it requires "modulo 1". [Bug #17257]
* Respectively, instead of respentivelyVictor Goff2020-10-121-1/+1
|
* * 2020-10-12 [ci skip]git2020-10-121-1/+1
|
* Prohibit setter method names in all kinds of endless methodsNobuyoshi Nakada2020-10-123-10/+66
| | | | Also unwrap NODE_RIPPER to check the method name.
* Adjusted indents [ci skip]Nobuyoshi Nakada2020-10-111-2/+3
|
* Respect the original styles [ci skip]Nobuyoshi Nakada2020-10-112-27/+31
|
* [ruby/io-console] Refined getch warningsNobuyoshi Nakada2020-10-111-3/+3
| | | | https://github.com/ruby/io-console/commit/f84e6abcce
* [ruby/io-console] Relaxed min: option warningNobuyoshi Nakada2020-10-111-1/+7
| | | | | | | | When `min: 0` is given to `IO#getch` with `time:` option, it is expected to return nil if timed out, and needed for source code the compatibility with unixen platforms. https://github.com/ruby/io-console/commit/a2afbe72bd
* [ruby/io-console] Fix timeout type error (#18)Nobuyoshi Nakada2020-10-112-1/+5
| | | | | | | | | | | | | | | | | Fixed TypeError when IO#getch timed out `rb_io_wait` returns a bit-flags Integer representing available events, or Qfalse if timed out. Also the result of `NUM2INT` is not a `VALUE`. ``` $ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)" ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32] -e:1:in `getch': no implicit conversion of false into Integer (TypeError) from -e:1:in `<main>' ``` https://github.com/ruby/io-console/commit/3bdfaf62df
* * 2020-10-11 [ci skip]git2020-10-111-1/+1
|
* [ruby/io-console] Fixed "Rework console to use `rb_io_wait`."Nobuyoshi Nakada2020-10-112-30/+53
| | | | | | | * Fixed backward compatibility. * Added missing `rb_scheduler_timeout` declaration. https://github.com/ruby/io-console/commit/813806079f
* Add Ractor#receive and Ractor.receive and use it in all placesBenoit Daloze2020-10-106-113/+117
| | | | * Keep Ractor#recv/Ractor.recv as an alias for now.
* Update RBS to 0.13.1 (#3645)Soutaro Matsumoto2020-10-101-1/+1
|
* Improve doc in rb_class_real doc (#3637)S.H2020-10-101-1/+1
|
* Fixed typo in commentIkko Ashimine2020-10-101-2/+2
| | | alway -> always
* * 2020-10-10 [ci skip]git2020-10-101-1/+1
|
* remove debug codeKoichi Sasada2020-10-101-2/+0
|
* Let bundled_gems specify commits to test (#3641)Soutaro Matsumoto2020-10-092-8/+11
|
* Refactored lex_context managementNobuyoshi Nakada2020-10-091-8/+8
| | | | | Save and restore `lex_context` as-is wholely, and save in `k_class` and `k_module` to workaround look-ahead reading.
* rb_const_set sets the class path nowNobuyoshi Nakada2020-10-091-1/+0
|
* rb_class_real never returns QnilNobuyoshi Nakada2020-10-091-1/+1
|
* Fix lldb disassembler so it works with core filesAaron Patterson2020-10-081-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the lldb disassembler script so that it doesn't need a live process when disassembling rb_iseq_t. I also added the PC to the output so you can tell what the VM is executing when it crashed. For example: ``` (lldb) rbdisasm ec->cfp->iseq PC IDX insn_name(operands) 0x56039f0a1720 0000 nop 0x56039f0a1728 0001 getlocal_WC_1( 5 ) 0x56039f0a1738 0003 branchunless( 7 ) 0x56039f0a1748 0005 getlocal_WC_0( 3 ) 0x56039f0a1758 0007 putstring( (VALUE)0x56039f0c7eb8 ) 0x56039f0a1768 0009 opt_send_without_block( (struct rb_call_data *)0x56039f09f140 ) 0x56039f0a1778 0011 pop 0x56039f0a1780 0012 getglobal( ID: 0x7fd7 ) 0x56039f0a1790 0014 branchunless( 7 ) 0x56039f0a17a0 0016 getlocal_WC_0( 3 ) 0x56039f0a17b0 0018 putstring( (VALUE)0x56039f0c7e90 ) 0x56039f0a17c0 0020 opt_send_without_block( (struct rb_call_data *)0x56039f09f150 ) 0x56039f0a17d0 0022 pop 0x56039f0a17d8 0023 getlocal_WC_0( 3 ) 0x56039f0a17e8 0025 putobject( (VALUE)0x56039f0c7e68 ) 0x56039f0a17f8 0027 getlocal_WC_1( 6 ) 0x56039f0a1808 0029 dup 0x56039f0a1810 0030 checktype( 5 ) 0x56039f0a1820 0032 branchif( 4 ) 0x56039f0a1830 0034 dup 0x56039f0a1838 0035 opt_send_without_block( (struct rb_call_data *)0x56039f09f160 ) 0x56039f0a1848 0037 tostring 0x56039f0a1850 0038 putobject( (VALUE)0x56039f0c7e40 ) 0x56039f0a1860 0040 concatstrings( 3 ) 0x56039f0a1870 0042 opt_send_without_block( (struct rb_call_data *)0x56039f09f170 ) 0x56039f0a1880 0044 nop 0x56039f0a1888 0045 leave (lldb) p ec->cfp->pc (const VALUE *) $146 = 0x000056039f0a1848 ``` Here we can see the VM is currently executing `opt_send_without_block` (because the PC is one ahead of the current instruction)
* * 2020-10-09 [ci skip]git2020-10-091-1/+1
|