Backport #10139

Backport r47190 (use RBASIC_SET_CLASS_RAW in setup_fake_str())

Added by Tomoyuki Chikanaga 8 months ago. Updated 7 months ago.

[ruby-core:64391]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

From commit message

fake strings should not set class by
RBASIC_SET_CLASS() because it insert write barriers to fake
(non-RVALUE) structure.
It can cause unexpected behaviour.
Ruby 2.1 also have a same problem (setup_fake_str() in parse.y).

Associated revisions

Revision 47480
Added by Tomoyuki Chikanaga 7 months ago

merge revision(s) r47190: [Backport #10139]

* string.c (setup_fake_str): fake strings should not set class by
  RBASIC_SET_CLASS() because it insert write barriers to fake
  (non-RVALUE) structure.
  It can cause unexpected behaviour.
  Ruby 2.1 also have a same problem (setup_fake_str() in parse.y).

* symbol.c (setup_fake_str): ditto.

History

#1 Updated by Tomoyuki Chikanaga 7 months ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset r47480.


merge revision(s) r47190: [Backport #10139]

* string.c (setup_fake_str): fake strings should not set class by
  RBASIC_SET_CLASS() because it insert write barriers to fake
  (non-RVALUE) structure.
  It can cause unexpected behaviour.
  Ruby 2.1 also have a same problem (setup_fake_str() in parse.y).

* symbol.c (setup_fake_str): ditto.

Also available in: Atom PDF