From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id DA3DC17DF46E for ; Sun, 7 Jun 2015 10:54:51 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 18C8CB5DA05 for ; Sun, 7 Jun 2015 11:15:09 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 4F25997A836 for ; Sun, 7 Jun 2015 11:15:10 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id evtB0fIoyvop for ; Sun, 7 Jun 2015 11:15:09 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id D053297A82B for ; Sun, 7 Jun 2015 11:15:09 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 83160952408 for ; Sun, 7 Jun 2015 11:15:08 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E8D39120420; Sun, 7 Jun 2015 11:15:06 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 95D87120400 for ; Sun, 7 Jun 2015 11:15:03 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=fgcgs03CNd/Sw4ldttbcGjLecAU=; b=S1TvMdYMU++ix1ELwy OsHc/YDAUkvwcF7FSY1oYzzmbEOravqlPuOlLh6aEw1ONBMd7QQriGwluoRiQqop 3O39zn1ssEYyMr6MVjv9ibBQkQcTyZDlTZu2lxFPSuJRAm/fhfvAr3RDW1aSSd+K 49t7mbu/1L3FckUJ0xaJc9Asw= Received: by filter0478p1mdw1.sendgrid.net with SMTP id filter0478p1mdw1.8046.5573A923A 2015-06-07 02:15:00.287982497 +0000 UTC Received: from herokuapp.com (ec2-54-91-225-100.compute-1.amazonaws.com [54.91.225.100]) by ismtpd-025 (SG) with ESMTP id 14dcbccb57a.8fd.d2ad70 for ; Sun, 07 Jun 2015 02:15:00 +0000 (UTC) Date: Sun, 07 Jun 2015 02:15:00 +0000 From: nobu@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 43961 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11231 X-Redmine-Issue-Author: Eregon X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4rcMnpNQH6J1li8907RUUIGiNKjBPRJcDBeu JeK93l1hpseWrfpUde4hV8/iUj1S6qs60jmFGn+xeNCaIzxqJUoYeERgBjxXH6sTP94cSNQBegvUIA fD/Xd+KRcwRv2r4= X-SendGrid-Contentd-ID: {"test_id":"1433643301"} X-ML-Name: ruby-core X-Mail-Count: 69484 Subject: [ruby-core:69484] [Ruby trunk - Bug #11231] [Closed] Should rb_alloc_tmp_buffer() be public API? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11231 has been updated by Nobuyoshi Nakada. Description updated Status changed from Open to Closed Benoit Daloze wrote: > `rb_alloc_tmp_buffer()` is declared in `include/ruby/intern.h`. `include/ruby/ruby.h`. > There was a try to specify it in > https://github.com/rubinius/rubinius/commit/bf0a6b988661d3917e9dcea62746b07b5f6d00ca > but this results in SEGV on MRI (I guess it is not intended usage of the API, but what would be correct usage?). > > It is used in the `ALLOCV()` macro, which is maybe the reason why this is part of the header? Yes, exactly. > Is there a way to hide such internal function? > Or is it on purpose declared publicly? It's similar to `alloca()`, the result should be used only in single function. ---------------------------------------- Bug #11231: Should rb_alloc_tmp_buffer() be public API? https://bugs.ruby-lang.org/issues/11231#change-52784 * Author: Benoit Daloze * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- `rb_alloc_tmp_buffer()` is declared in `include/ruby/intern.h`. However it seems this is a fairly internal API as it deals with a `VALUE` pointer and has undocumented liveliness/GC behavior. There was a try to specify it in https://github.com/rubinius/rubinius/commit/bf0a6b988661d3917e9dcea62746b07b5f6d00ca but this results in SEGV on MRI (I guess it is not intended usage of the API, but what would be correct usage?). It is used in the `ALLOCV()` macro, which is maybe the reason why this is part of the header? Is there a way to hide such internal function? Or is it on purpose declared publicly? -- https://bugs.ruby-lang.org/