Project

General

Profile

Actions

Feature #9761

closed

TRY_WITH_GC with ruby_gc_stress

Added by wanabe (_ wanabe) over 10 years ago. Updated over 10 years ago.

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

Description

I hope TRY_WITH_GC() may use ruby_gc_stress value.

Currently, ruby_gc_stress doesn't affect simple xmalloc()/xrealloc()/xcalloc().
It is usefull to make these functions under gc-stress.
For example, #9657 is difficult to reproduce on trunk because there is not object creation but memory allocation after BigDecimal_new().


Files

try_with_gc-with-gc_stress.patch (691 Bytes) try_with_gc-with-gc_stress.patch wanabe (_ wanabe), 04/20/2014 01:39 AM
xrealloc-with-gc_stress.patch (456 Bytes) xrealloc-with-gc_stress.patch wanabe (_ wanabe), 04/21/2014 03:20 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #9859: An object with 6 instance variables causes SEGVClosed05/23/2014Actions

Updated by wanabe (_ wanabe) over 10 years ago

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Description updated (diff)
  • Category set to core
  • Status changed from Open to Feedback

Patches are welcome.

Updated by wanabe (_ wanabe) over 10 years ago

I have written but I have not been able to avoid both temporary assignment and duplication of garbage_collect_with_gvl().

Updated by wanabe (_ wanabe) over 10 years ago

  • Category set to core

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Open to Feedback

Seems objspace_malloc_increase() already runs GC after xmalloc and xcalloc if ruby_gc_stress is set.
You may want it to run after xrealloc too?
Or to run full marking?

Updated by wanabe (_ wanabe) over 10 years ago

Nobuyoshi Nakada wrote:

Seems objspace_malloc_increase() already runs GC after xmalloc and xcalloc if ruby_gc_stress is set.
You may want it to run after xrealloc too?
Or to run full marking?

Sorry for my poor code reading...
It is enough to add a case of xrealloc for my concern, reproducing #9657.

Anyone can close/reject this ticket if you think this is far from the original proposal.

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

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

Applied in changeset r45653.


gc.c: GC.stress after realloc

  • gc.c (objspace_malloc_increase): run GC after realloc not only
    malloc and calloc by GC.stress. [ruby-core:62103] [Feature #9761]

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Related to Bug #9859: An object with 6 instance variables causes SEGV added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0