Project

General

Profile

Backport #9828

Segfault instead of stack overflow

Added by plexus (Arne Brasseur) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:62521]

Description

This causes a segmentation fault on 2.1.1 and 2.1.2, instead of SystemStackError

define_method(:foo) { send(:foo) }
foo

Related issues

Is duplicate of Ruby master - Bug #9454: The define_method(:class) segfaultClosed01/26/2014Actions

Associated revisions

Revision ced638cc
Added by nagachika (Tomoyuki Chikanaga) over 5 years ago

merge revision(s) r44712,r44715,r44716,r44722,r44725,r44726,r44753: [Backport #9454] [Backport #9828]

    * thread_pthread.c: get current main thread stack size, which may
      be expanded than allocated size at initialization, by rlimit().
      [ruby-core:60113] [Bug #9454]

    * thread_pthread.c: rlimit is only available on Linux.
      At least r44712 breaks FreeBSD.
      [ruby-core:60113] [Bug #9454]

    * thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p):
      place get_stack above others to get stack boundary information.
      [ruby-core:60113] [Bug #9454]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@46468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 46468
Added by nagachika (Tomoyuki Chikanaga) over 5 years ago

merge revision(s) r44712,r44715,r44716,r44722,r44725,r44726,r44753: [Backport #9454] [Backport #9828]

* thread_pthread.c: get current main thread stack size, which may
  be expanded than allocated size at initialization, by rlimit().
  [ruby-core:60113] [Bug #9454]

* thread_pthread.c: rlimit is only available on Linux.
  At least r44712 breaks FreeBSD.
  [ruby-core:60113] [Bug #9454]

* thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p):
  place get_stack above others to get stack boundary information.
  [ruby-core:60113] [Bug #9454]

History

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport21
  • Description updated (diff)
  • Category deleted (core)

SystemStackError on trunk.

Updated by hsbt (Hiroshi SHIBATA) over 5 years ago

nobu

Do you know which commits related to this issue?

#3

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

The test for it was introduced at r44712, but many changes are in thread*.c and signal.c then.

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Is duplicate of Bug #9454: The define_method(:class) segfault added

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

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

Applied in changeset r46468.


merge revision(s) r44712,r44715,r44716,r44722,r44725,r44726,r44753: [Backport #9454] [Backport #9828]

* thread_pthread.c: get current main thread stack size, which may
  be expanded than allocated size at initialization, by rlimit().
  [ruby-core:60113] [Bug #9454]

* thread_pthread.c: rlimit is only available on Linux.
  At least r44712 breaks FreeBSD.
  [ruby-core:60113] [Bug #9454]

* thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p):
  place get_stack above others to get stack boundary information.
  [ruby-core:60113] [Bug #9454]

Also available in: Atom PDF