Project

General

Profile

Actions

Bug #11291

closed

[PATCH] Check SPECIAL_CONST_P before RBASIC_CLASS to avoid SEGV

Added by eagletmt (Kohei Suzuki) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[ruby-core:69692]

Description

https://github.com/ruby/ruby/pull/943

It fixes SEGV when a special constant is passed to ObjectSpace.dump .
I think it needs to be backported to 2.1 and 2.2.


Related issues

Related to Ruby master - Feature #11292: objspace: Dump type of special constsOpentmm1 (Aman Gupta)Actions

Updated by sorah (Sorah Fukumori) over 6 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED
Actions #2

Updated by sorah (Sorah Fukumori) over 6 years ago

  • Status changed from Open to Closed

Applied in changeset r50982.


  • ext/objspace/objspace_dump.c(dump_object): Return empty JSON object when
    passed object is a special const, instead of SEGV.
    Based patch by Kohei Suzuki (eagletmt). [ruby-core:69692] [Bug #11291]

  • test/objspace/test_objspace.rb(test_dump_special_consts): Test for above fix.

Actions #3

Updated by sorah (Sorah Fukumori) over 6 years ago

  • Related to Feature #11292: objspace: Dump type of special consts added

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE

Backported into ruby_2_2 branch at r51047.

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE to 2.0.0: UNKNOWN, 2.1: DONE, 2.2: DONE

ruby_2_1 r51059 merged revision(s) 50982,50983.

Actions

Also available in: Atom PDF