1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
Alan Wu 9dec4e8fc3
String#b: Don't depend on dependent string
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe and 3f95620 for details.

The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for using eval as a cross-version way
of registering a fstring.

```ruby
a = ('j' * 24).b.b
eval('', binding, a)

p a
4.times { GC.start }
p a
```

 - string.c (str_replace_shared_without_enc): when given a
   dependent string, depend on the root of the dependent
   string.

[Bug #15934]
2019-06-18 12:18:13 +09:00
..
enc Test to disable ASCII-only optimization 2019-05-17 10:05:57 +09:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb marshaltestlib.rb: use clean object for exception 2018-04-12 03:40:16 +00:00
sentence.rb
test_alias.rb
test_argf.rb Fix error when Encoding.default_external is Encoding::IBM437 2018-08-09 09:36:03 +00:00
test_arithmetic_sequence.rb enumerator.c: force hash values fixable 2019-04-08 03:26:27 +00:00
test_arity.rb
test_array.rb Revive accidentally removed assertion 2019-04-03 09:35:26 +00:00
test_assignment.rb Enable the assertions that had been disabled for historical reason 2018-04-17 08:26:20 +00:00
test_ast.rb Add test for UNTIL 2019-05-18 09:41:22 +09:00
test_autoload.rb Avoid triggering autoload in Module#const_defined?(String) 2019-05-07 21:20:01 +09:00
test_backtrace.rb Fix a wrong lineno in backtrace for cfunc 2019-03-21 05:59:14 +00:00
test_basicinstructions.rb Remove the old disabled assertions for 1.8/1.9 2018-04-17 08:47:56 +00:00
test_beginendblock.rb eval.c: clear internal errinfo 2019-03-10 06:46:28 +00:00
test_bignum.rb use Queue for inter-thread synchronization. 2018-04-04 05:00:52 +00:00
test_call.rb
test_case.rb
test_class.rb Use assert_syntax_error 2019-02-08 02:54:21 +00:00
test_clone.rb Don't copy FL_USER* on Kernel#clone. [Bug #14847] 2018-07-09 08:07:26 +00:00
test_comparable.rb Ignore warnings about mismatched indentations. 2019-06-01 15:23:24 +03:00
test_complex.rb No TypeError at nil if exception: false 2019-01-12 05:02:58 +00:00
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb Revert "Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3" 2019-06-16 23:00:05 +09:00
test_continuation.rb Give up support for cross-callcc set_trace_func. 2018-11-26 19:59:08 +00:00
test_default_gems.rb Fixed wrong variable name. 2018-06-02 13:55:54 +00:00
test_defined.rb
test_dir.rb dir.c: fix Dir.glob starts with brace 2019-03-21 13:32:03 +00:00
test_dir_m17n.rb
test_econv.rb
test_encoding.rb Assertion for r67226 2019-03-12 12:04:03 +00:00
test_enum.rb Adding Enumerable#filter_map 2019-05-23 14:39:16 +09:00
test_enumerator.rb Make size on an infinite each_slice enumerator return Infinity 2019-06-02 20:00:35 -07:00
test_env.rb Removed Windows version condition 2018-10-01 07:50:08 +00:00
test_eval.rb Remove the old disabled assertions for 1.8/1.9 2018-04-17 08:47:56 +00:00
test_exception.rb error.c: avoid infinite recursion at inspecting the frozen object 2019-06-05 13:31:09 +09:00
test_fiber.rb Don't allow rb_fiber_resume to raise exception on unborn fiber. 2018-12-28 13:03:14 +00:00
test_file.rb Always mark the string returned by File.realpath as tainted 2019-04-28 10:47:51 +09:00
test_file_exhaustive.rb Skip EPERM, when statx(2) is wholely blocked 2019-02-22 06:35:44 +00:00
test_fixnum.rb
test_flip.rb Remove warnings of flip-flop deprecation from tests and specs 2018-06-15 08:53:16 +00:00
test_float.rb object.c: raise on long invalid float string 2018-05-04 06:12:12 +00:00
test_fnmatch.rb Split test_fnmatch 2018-12-17 05:57:15 +00:00
test_gc.rb test/ruby/test_gc.rb (test_gc_stress_at_startup): extend time timeout 2019-05-24 11:20:12 +09:00
test_gc_compact.rb Test GC.compact with MJIT again 2019-05-23 09:03:34 -07:00
test_hash.rb hash.c (rb_hash_s_create): Reject Hash[[nil]] 2019-05-23 00:19:56 +09:00
test_ifunless.rb Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
test_integer.rb numeric.c: Extend Integer#[] to support range arguments 2019-04-28 23:40:57 +09:00
test_integer_comb.rb
test_io.rb assert_cpu_usage_low with timeout scale 2019-06-11 23:15:46 +09:00
test_io_m17n.rb IO#set_encoding_by_bom 2019-06-13 18:13:05 +09:00
test_iseq.rb Ignore warnings about ambiguous first argument of regexp with assert match. 2019-06-01 14:44:24 +03:00
test_iterator.rb Prefer block_given? to iterator? 2019-01-18 09:52:50 +00:00
test_jit.rb Prefer uintptr_t over ptrdiff_t for i686 2019-04-14 09:31:24 +00:00
test_key_error.rb
test_keyword.rb compile.c: fix the corner case of rest and keyword arguments 2019-03-14 09:04:57 +00:00
test_lambda.rb
test_lazy_enumerator.rb Ignore warnings about argument prefix with operator symbol. 2019-06-01 15:20:21 +03:00
test_literal.rb parse.y: warn escaped whitespace 2019-05-29 00:00:26 +09:00
test_m17n.rb string.c: respect the actual encoding 2019-03-05 00:32:15 +00:00
test_m17n_comb.rb Update String#crypt tests to work on OpenBSD 2019-06-01 10:50:06 -07:00
test_marshal.rb
test_math.rb math.c: adjust cbrt 2018-06-06 14:01:43 +00:00
test_metaclass.rb
test_method.rb Hide internal IDs 2019-04-26 09:33:48 +09:00
test_mixed_unicode_escapes.rb
test_module.rb Fix FrozenError when assigning frozen class to constant 2019-06-01 02:41:14 +09:00
test_not.rb Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
test_notimp.rb test/ruby/test_notimp.rb: Use EnvUtil.timeout for timeout scale factor 2019-05-26 18:24:06 +09:00
test_numeric.rb numeric.c: Fix negative step with float components 2019-01-24 05:30:42 +00:00
test_object.rb class.c: refactor class_instance_method_list 2019-01-09 14:04:21 +00:00
test_objectspace.rb
test_optimization.rb compile.c: Partially revert r63870 which caused wrong optimization 2019-06-07 14:46:59 +09:00
test_pack.rb pack.c: refine warning 2018-11-16 00:25:54 +00:00
test_parse.rb Fix the error token on "invalid hex escape" 2019-06-03 15:15:54 +09:00
test_path.rb
test_pattern_matching.rb Simplified the guard against old versions 2019-05-21 13:49:31 +09:00
test_pipe.rb
test_primitive.rb
test_proc.rb Hide internal IDs 2019-04-26 09:33:48 +09:00
test_process.rb Keep vm->orig_progname alive 2019-05-31 14:38:35 +09:00
test_rand.rb random.c: endless range random 2018-08-03 06:31:22 +00:00
test_range.rb range.c (inspect_range): omit beginless "nil" 2019-05-23 00:48:32 +09:00
test_rational.rb No TypeError at nil if exception: false 2019-01-12 05:02:58 +00:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb Fix SystemStackError when calling a method in an unused refinement 2019-06-11 09:43:38 -07:00
test_regexp.rb update to Unicode Version 12.1.0 (beta) 2019-04-05 00:58:51 +00:00
test_require.rb Avoid to show warning message with unused variable. 2019-05-25 11:28:07 +09:00
test_rubyoptions.rb Include inspect value of object in FrozenError messages 2019-06-04 19:25:03 -07:00
test_rubyvm.rb
test_rubyvm_mjit.rb skip tests if --disable-mjit-support. 2018-10-20 08:06:50 +00:00
test_settracefunc.rb Fix typos [ci skip] 2019-04-25 00:52:16 +09:00
test_signal.rb thread_pthread.c: main thread always gets hit by signals 2018-08-25 21:59:30 +00:00
test_sleep.rb
test_sprintf.rb test_sprintf.rb: test for %p 2018-09-15 08:39:07 +00:00
test_sprintf_comb.rb
test_string.rb String#b: Don't depend on dependent string 2019-06-18 12:18:13 +09:00
test_stringchar.rb
test_struct.rb struct.c: force hash values fixable 2019-04-08 05:06:43 +00:00
test_super.rb test/ruby/test_super.rb: Remove unused assertions 2018-04-17 08:52:25 +00:00
test_symbol.rb vm_args.c: search symbol proc in super classes 2018-12-30 21:42:52 +00:00
test_syntax.rb Fix wrong "void value expression" error 2019-06-17 22:30:52 +09:00
test_system.rb test/ruby/test_system.rb: suppress prompt and echo on Windows 2018-08-18 02:44:35 +00:00
test_thread.rb Ensure to terminate the child 2019-01-11 01:18:59 +00:00
test_thread_cv.rb revisit more MJIT test skips 2018-10-22 15:49:22 +00:00
test_thread_queue.rb appveyor.yml: give up running TestThreadQueue#test_queue_with_trap 2018-10-07 14:05:56 +00:00
test_threadgroup.rb
test_time.rb Add Time#ceil. 2019-05-23 22:30:19 +09:00
test_time_tz.rb time.c: added in: option to Time.now 2019-04-19 08:53:40 +00:00
test_trace.rb
test_transcode.rb
test_undef.rb Test for undef'ed method in class hierachy 2018-11-16 04:21:57 +00:00
test_unicode_escape.rb
test_variable.rb Include inspect value of object in FrozenError messages 2019-06-04 19:25:03 -07:00
test_vm_dump.rb
test_weakmap.rb test_weakmap.rb: skip unstable assertion 2018-03-16 14:12:39 +00:00
test_whileuntil.rb
test_yield.rb
ut_eof.rb