ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:38861] [Ruby 1.9 - Bug #5171][Open] [PATCH] date_core: RB_GC_GUARD temporary strings
Date: Tue, 9 Aug 2011 07:31:26 +0900	[thread overview]
Message-ID: <redmine.issue-5171.20110809073047@ruby-lang.org> (raw)


Issue #5171 has been reported by Eric Wong.

----------------------------------------
Bug #5171: [PATCH] date_core: RB_GC_GUARD temporary strings
http://redmine.ruby-lang.org/issues/5171

Author: Eric Wong
Status: Open
Priority: Normal
Assignee: tadayoshi funaba
Category: ext
Target version: 1.9.x
ruby -v: ruby 1.9.4dev (2011-08-07 trunk 32885) [x86_64-linux]


ext/date/date_core.c (d_lite_inspect): RB_GC_GUARD temporary strings

test/date/test_date.rb: add test case with GC.stress=true

RSTRING_PTR() should not be used directly on function calls:
1) it may drop the VALUE reference from the stack/register set
and and allow GC to collect it
2) macros can evaluate the function call multiple times


If DNDEBUG is not defined, Date#inspect_raw also has the same issue.
However, I think removing the Date#inspect_raw code entirely is better.

If you prefer to use "git pull":
  git pull git://bogomips.org/ruby date_core-gc-guard



-- 
http://redmine.ruby-lang.org

             reply	other threads:[~2011-08-08 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 22:31 Eric Wong [this message]
2011-08-09  0:55 ` [ruby-core:38865] [Ruby 1.9 - Bug #5171] [PATCH] date_core: RB_GC_GUARD temporary strings Eric Wong
2011-08-13  8:08 ` [ruby-core:38945] [Ruby 1.9 - Bug #5171][Closed] " tadayoshi funaba

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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

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

  git send-email \
    --in-reply-to=redmine.issue-5171.20110809073047@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
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).