HomePhorge

Possible workaround for #2824 (MRI GC bug)
bd5dc649ad55Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Possible workaround for #2824 (MRI GC bug)

This is a moderately ugly workaround for the MRI garbage collection
bug (see the ticket for details).

I explored several other potential solutions (notably, monkey
patching the routines that trigger the bug) but none of them were
satisfactory. Monkey patching sub, gsub, sub!, gsub!, etc., for
example, either changes the scoping of $~, $1, etc. in a way that
could potentially subtly change the meaning of programs or (if you
are clever) faithfully reproduces the behaviour of MRI--including
the memory leak.

I decided to go with the standardized and somewhat obnoxious never-
used optional argument as it was easy to automatically insert and
should be even easier to automatically find and remove if a better
fix is developed. It also should be obtrusive enough to escape
accidental removal in refactoring.

Details

Provenance
Markus Roberts <Markus@reality.com>Authored on
James Turnbull <james@lovedthanlost.net>Committed on Nov 19 2009, 1:21 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUc1e47a43df40: Fixing #2789 puppetrun fails without --tag
Branches
Unknown
Tags
Unknown

Event Timeline

James Turnbull <james@lovedthanlost.net> committed rPUbd5dc649ad55: Possible workaround for #2824 (MRI GC bug) (authored by Markus Roberts <Markus@reality.com>).Nov 19 2009, 1:21 AM