Project

General

Profile

Actions

Bug #9616

closed

[PATCH] class.c: check for malloc failures

Added by normalperson (Eric Wong) about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-03-09 trunk 45296) [x86_64-linux]
[ruby-core:61386]

Description

Will commit attached patch to trunk. Note backport field for 2.1


Files

0001-class.c-check-for-malloc-failures.patch (1.41 KB) 0001-class.c-check-for-malloc-failures.patch normalperson (Eric Wong), 03/09/2014 05:18 AM
Actions #1

Updated by Anonymous about 8 years ago

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

Applied in changeset r45302.


class.c: check for malloc failures

  • class.c (rb_class_subclass_add): use xmalloc
  • class.c (rb_module_add_to_subclasses_list): ditto
  • class.c (rb_class_remove_from_super_subclasses): use xfree
  • class.c (rb_class_remove_from_module_subclasses): ditto
    [Bug #9616]

xmalloc does OOM checking and helps GC accounting when used
with xfree.

Updated by nagachika (Tomoyuki Chikanaga) almost 8 years ago

  • Backport changed from 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONE

Backported into ruby_2_1 branch at r46319.

Actions

Also available in: Atom PDF