Project

General

Profile

Actions

Bug #20245

closed

Crash when checking symbol encoding

Added by peterzhu2118 (Peter Zhu) 3 months ago. Updated about 2 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:116622]

Description

GitHub PR: https://github.com/ruby/ruby/pull/9871

We sometimes pass in a fake string to sym_check_asciionly. This can crash if sym_check_asciionly raises because it creates a CFP with the fake string as the receiver which will crash if GC tries to mark the CFP.

For example, the following script crashes:

GC.stress = true
Object.const_defined?("\xC3")
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0