| Age | Commit message (Collapse) | Author |
|
|
|
|
|
The "EXIVAR" terminology has been replaced by "gen fields"
AKA "generic fields".
Exivar implies variable, but generic fields include more than
just variables, e.g. `object_id`.
|
|
Re-organize page docs
|
|
|
|
|
|
to adopt strict shareable rule.
* (basically) shareable objects only refer shareable objects
* (exception) shareable objects can refere unshareable objects
but should not leak reference to unshareable objects to Ruby world
|
|
|
|
It does raise an exception rather than just issuing a warning:
```shell
$ docker run -e ALL_RUBY_SINCE=2.7 --rm rubylang/all-ruby ./all-ruby -We 'ENV.clone'
ruby-2.7.0
...
ruby-3.0.7
ruby-3.1.0-preview1 -e:1: warning: ENV.clone is deprecated; use ENV.to_h instead
...
ruby-3.2.0-preview1 -e:1: warning: ENV.clone is deprecated; use ENV.to_h instead
ruby-3.2.0-preview2 -e:1:in `clone': Cannot clone ENV, use ENV.to_h to get a copy of ENV as a hash (TypeError)
from -e:1:in `<main>'
exit 1
...
ruby-3.3.9 -e:1:in `clone': Cannot clone ENV, use ENV.to_h to get a copy of ENV as a hash (TypeError)
from -e:1:in `<main>'
exit 1
ruby-3.4.0-preview1 -e:1:in 'clone': Cannot clone ENV, use ENV.to_h to get a copy of ENV as a hash (TypeError)
from -e:1:in '<main>'
exit 1
...
ruby-3.5.0-preview1 -e:1:in 'clone': Cannot clone ENV, use ENV.to_h to get a copy of ENV as a hash (TypeError)
from -e:1:in '<main>'
exit 1
```
|
|
|
|
Make sure VM lock is not held when calling `load_transcoder_entry`, as
that causes deadlock inside ractors. `String#encode` now works inside
ractors, among others.
Atomic load the rb_encoding_list
Without this, wbcheck would sometimes hit a missing write barrier.
Co-authored-by: John Hawthorn <john.hawthorn@shopify.com>
Hold VM lock when iterating over global_enc_table.names
This st_table can be inserted into at runtime when autoloading
encodings.
minor optimization when calling Encoding.list
|
|
|
|
hash.c compiles just fine on HASH_DEBUG without including internal/gc.h.
|
|
|
|
We don't need to delay the freeing of the fstr for the symbol if we store
the hash of the fstr in the dynamic symbol and we use compare-by-identity
for removing the dynamic symbol from the sym_set.
|
|
Hash#rehash checks whether the hash is iterating, and with VWA,
RHASH_ST_TABLE() always returns the same thing for the same
hash.
RHASH_ST_TABLE(VALUE h)
{
return (st_table *)((uintptr_t)h + sizeof(struct RHash));
}
So this check can never fail and raise an exception. Remove it.
|
|
Hash#rehash checks for rehash during iteration, and there
seems to be no efficient way to check for it after the fact,
so remove the TODO.
|
|
|
|
The write barriers must be run after the st_update callback returns,
as the objects are not on the object until then and there may be
allocation when there is a new object inserted.
This is hard to reproduce, and I haven't seen an actual crash due to it,
but it is detected by wbcheck
RUBY_GC_LIBRARY=wbcheck WBCHECK_VERIFY_AFTER_WB=1 ./miniruby -e '("a".."zz").uniq.to_a'
WBCHECK ERROR: Missed write barrier detected!
Parent object: 0x720db01f99c0 (wb_protected: true)
rb_obj_info_dump: 0x0000720db01f99c0 T_HASH/[S] 18
Reference counts - snapshot: 32, writebarrier: 2, current: 36, missed: 2
Missing reference to: 0x716db02e3450
rb_obj_info_dump: 0x0000716db02e3450 T_STRING/String len: 1, capa: 15 "q"
Missing reference to: 0x716db02e3450
rb_obj_info_dump: 0x0000716db02e3450 T_STRING/String len: 1, capa: 15 "q"
A part of why this is hard to reproduce and it's unlikely to crash is
that the insertion only rarely allocates.
Co-authored-by: Luke Gruber <luke.gruber@shopify.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13634
|
|
We still keep setting `FL_EXIVAR` so that `rb_shape_verify_consistency`
can detect discrepancies.
Notes:
Merged: https://github.com/ruby/ruby/pull/13612
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13439
|
|
Prior to https://github.com/ruby/ruby/commit/49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c
the `optional_arg` passed from `rb_hash_update_block_i` to `tbl_update`
was a hash value (i.e. a VALUE). After that commit it changed to an
`update_call_args`.
If the block sets or changes the value, `tbl_update_modify` will set the
`arg.value` back to an actual value and we won't crash. But in the case
where the block returns the original value we end up calling
`RB_OBJ_WRITTEN` with the `update_call_args` which is not expected and
may crash.
`arg.value` appears to only be used to pass to `RB_OBJ_WRITTEN` (others
who need the `update_call_args` get it from `arg.arg`), so I don't think
it needs to be set to anything upfront. And `tbl_update_modify` will set
the `arg.value` in the cases we need the write barrier.
Notes:
Merged: https://github.com/ruby/ruby/pull/13404
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13344
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13329
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13329
|
|
This reverts commit bb180b87b43c45e17ff49735a26d7a188d5c8396, which
caused "malloc during GC" error on wasm.
Notes:
Merged: https://github.com/ruby/ruby/pull/13329
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13317
|
|
This was missed when adding core Set, because it's handled
implicitly for T_OBJECT.
Keep marshal compatibility between core Set and stdlib Set,
so you can unmarshal core Set with stdlib Set and vice versa.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/13185
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13029
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13020
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12985
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12989
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12988
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12986
|
|
Notes:
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12944
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12943
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12935
|
|
Notes:
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12920
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12919
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12907
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12908
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12906
|
|
Notes:
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12902
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|
|
Notes:
Merged-By: peterzhu2118 <peter@peterzhu.ca>
|