[#101179] Spectre Mitigations — Amel <amel.smajic@...>
Hi there!
5 messages
2020/12/01
[#101180] Re: Spectre Mitigations
— Chris Seaton <chris@...>
2020/12/01
I wouldn’t recommend using Ruby to run in-process untrusted code in the first place. Are people doing that?
[#101694] Ruby 3.0.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 3.0.0. From 2015 we
4 messages
2020/12/25
[ruby-core:101474] [Ruby master Feature#17397] shareable_literal_constant should check at runtime, not at parse time
From:
marcandre-ruby-core@...
Date:
2020-12-16 18:58:23 UTC
List:
ruby-core #101474
Issue #17397 has been updated by marcandre (Marc-Andre Lafortune).
Ideally, the following would also be accepted:
```ruby
# shareable_constant_value: literal
Map = {
int: Integer,
str: String,
# ...
}
Map.frozen # => true
```
Literals that are arguments to method calls should not be frozen:
```ruby
# shareable_constant_value: literal
def check(arg)
p arg.frozen?
arg.freeze
end
X = check([1,2,3]) # => prints false
Y = [1] + [2] # => error
```
----------------------------------------
Feature #17397: shareable_literal_constant should check at runtime, not at parse time
https://bugs.ruby-lang.org/issues/17397#change-89251
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
----------------------------------------
I think `shareable_constant_value: literal` is too strict because it has too crude checks at parse time.
I wish the following code would parse and run:
```ruby
# shareable_constant_value: literal
class Foo < RuntimeError
end
# Similar code, but does not parse:
Bar = Class.new(RuntimeError) # => unshareable expression
Baz = Ractor.make_shareable(anything_here) # => unshareable expression
Qux = Set[1, 2, 3].freeze # => unshareable expression
```
Could we instead raise some sort of RuntimeError when an assignment is made that is not shareable?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>