kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <>
To: Ngan Pham <>
Subject: Re: Patch for GC.compact memory issue
Date: Mon, 24 May 2021 17:22:08 +0000	[thread overview]
Message-ID: <20210524172208.GA7627@dcvr> (raw)
In-Reply-To: <>

Ngan Pham <> wrote:
> Hello, I'd like to submit a patch to fix an issue after running
> `GC.compact`. The LOCALHOST variable is defined in Ruby and is
> resolved and memoized (to `localhost`) in C once. However, the pointer
> in C is not GC marked. Running `GC.compact` potentially moves the
> `LOCALHOST` object in Ruby causing `localhost` to point to a bad or
> empty slot. This causes `env['REMOTE_ADDR']` to  a bad object in
> Unicorn.

Seems to make sense.

> Some useful links:
> - `GC.compact` introduced:
> - My conversation with tenderlove over twitter on this issue:

Can you please copy+paste the conversation here?
Accessibility-challenged users such as myself cannot
read it without JavaScript.  Thanks.

  reply	other threads:[~2021-05-24 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 14:14 Patch for GC.compact memory issue Ngan Pham
2021-05-24 17:22 ` Eric Wong [this message]
2021-05-24 19:00   ` Ngan Pham
2021-05-24 20:33     ` Eric Wong
2021-05-24 21:11       ` Ngan Pham
2021-05-24 21:48         ` [PATCH] HACKING: update docs with "git request-pull" info Eric Wong
2021-05-25 16:41         ` Patch for GC.compact memory issue Aaron Patterson
2021-05-25 22:50           ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524172208.GA7627@dcvr \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).