ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:69482] [Ruby trunk - Bug #11231] [Open] Should rb_alloc_tmp_buffer() be public API?
       [not found] <redmine.issue-11231.20150606201918@ruby-lang.org>
@ 2015-06-06 20:19 ` eregontp
  2015-06-07  2:15 ` [ruby-core:69484] [Ruby trunk - Bug #11231] [Closed] " nobu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: eregontp @ 2015-06-06 20:19 UTC (permalink / raw)
  To: ruby-core

Issue #11231 has been reported by Benoit Daloze.

----------------------------------------
Bug #11231: Should rb_alloc_tmp_buffer() be public API?
https://bugs.ruby-lang.org/issues/11231

* Author: Benoit Daloze
* Status: Open
* 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:69484] [Ruby trunk - Bug #11231] [Closed] Should rb_alloc_tmp_buffer() be public API?
       [not found] <redmine.issue-11231.20150606201918@ruby-lang.org>
  2015-06-06 20:19 ` [ruby-core:69482] [Ruby trunk - Bug #11231] [Open] Should rb_alloc_tmp_buffer() be public API? eregontp
@ 2015-06-07  2:15 ` nobu
  2015-06-07 13:59 ` [ruby-core:69487] [Ruby trunk - Bug #11231] " eregontp
  2015-06-30  3:47 ` [ruby-core:69794] [Ruby trunk - Bug #11231] [Rejected] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2015-06-07  2:15 UTC (permalink / raw)
  To: 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:69487] [Ruby trunk - Bug #11231] Should rb_alloc_tmp_buffer() be public API?
       [not found] <redmine.issue-11231.20150606201918@ruby-lang.org>
  2015-06-06 20:19 ` [ruby-core:69482] [Ruby trunk - Bug #11231] [Open] Should rb_alloc_tmp_buffer() be public API? eregontp
  2015-06-07  2:15 ` [ruby-core:69484] [Ruby trunk - Bug #11231] [Closed] " nobu
@ 2015-06-07 13:59 ` eregontp
  2015-06-30  3:47 ` [ruby-core:69794] [Ruby trunk - Bug #11231] [Rejected] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: eregontp @ 2015-06-07 13:59 UTC (permalink / raw)
  To: ruby-core

Issue #11231 has been updated by Benoit Daloze.


Thanks for the explanations!

----------------------------------------
Bug #11231: Should rb_alloc_tmp_buffer() be public API?
https://bugs.ruby-lang.org/issues/11231#change-52787

* 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:69794] [Ruby trunk - Bug #11231] [Rejected] Should rb_alloc_tmp_buffer() be public API?
       [not found] <redmine.issue-11231.20150606201918@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-06-07 13:59 ` [ruby-core:69487] [Ruby trunk - Bug #11231] " eregontp
@ 2015-06-30  3:47 ` usa
  3 siblings, 0 replies; 4+ messages in thread
From: usa @ 2015-06-30  3:47 UTC (permalink / raw)
  To: ruby-core

Issue #11231 has been updated by Usaku NAKAMURA.

Status changed from Closed to Rejected

----------------------------------------
Bug #11231: Should rb_alloc_tmp_buffer() be public API?
https://bugs.ruby-lang.org/issues/11231#change-53184

* Author: Benoit Daloze
* Status: Rejected
* 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-30  3:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11231.20150606201918@ruby-lang.org>
2015-06-06 20:19 ` [ruby-core:69482] [Ruby trunk - Bug #11231] [Open] Should rb_alloc_tmp_buffer() be public API? eregontp
2015-06-07  2:15 ` [ruby-core:69484] [Ruby trunk - Bug #11231] [Closed] " nobu
2015-06-07 13:59 ` [ruby-core:69487] [Ruby trunk - Bug #11231] " eregontp
2015-06-30  3:47 ` [ruby-core:69794] [Ruby trunk - Bug #11231] [Rejected] " usa

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