[#70252] Re: [ruby-cvs:58640] nobu:r51492 (trunk): node.c: NODE_ALLOCA for ALLOCV — Eric Wong <normalperson@...>
Besides possible backwards compatibility, can we drop volatile
3 messages
2015/08/05
[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...
Issue #11420 has been reported by Koichi Sasada.
11 messages
2015/08/06
[#70337] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/11
Nice. Thank you guys for looking into this.
[#70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
Btw, did you consider using flexible array to avoid extra malloc
[#70355] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Юрий Соколов <funny.falcon@...>
2015/08/12
I thought to suggest to embed hash_id_table directly into places when it is
[#70356] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— SASADA Koichi <ko1@...>
2015/08/12
On 2015/08/13 4:29, Юрий Соколов wrote:
[#70358] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
SASADA Koichi <ko1@atdot.net> wrote:
[#70509] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — ko1@...
Issue #11276 has been updated by Koichi Sasada.
3 messages
2015/08/21
[#70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields — Daniel Doubrovkine <dblock@...>
(this is my first time e-mailing list list, so apologies for any misstep :)
4 messages
2015/08/31
[ruby-core:70325] [Ruby trunk - Bug #11393] segfault on trivial application, embedding in C app.
From:
abudovski@...
Date:
2015-08-11 05:02:12 UTC
List:
ruby-core #70325
Issue #11393 has been updated by Alex Budovski.
Yes, ruby_sysinit() was the key! Thanks.
----------------------------------------
Bug #11393: segfault on trivial application, embedding in C app.
https://bugs.ruby-lang.org/issues/11393#change-53746
* Author: Alex Budovski
* Status: Third Party's Issue
* Priority: Normal
* Assignee:
* ruby -v: 2.2.2
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
~~~c
#include <ruby.h>
#include <stdio.h>
int main()
{
ruby_setup();
rb_load_file("abc"); // AV here
ruby_cleanup(0);
}
~~~
~~~
rbtest1.exe!rb_vm_bugreport(const void * ctx) Line 1024 C
rbtest1.exe!rb_bug_context(const void * ctx, const char * fmt, ...) Line 422 C
rbtest1.exe!sigsegv(int sig) Line 887 C
[External Code]
rbtest1.exe!rb_threadptr_tag_jump(rb_thread_struct * th, int st) Line 163 C
> rbtest1.exe!rb_ensure(unsigned __int64 (...) * b_proc, unsigned __int64 data1, unsigned __int64 (...) * e_proc, unsigned __int64 data2) Line 915 C
rbtest1.exe!load_file(unsigned __int64 parser, unsigned __int64 fname, int script, cmdline_options * opt) Line 1779 C
rbtest1.exe!rb_load_file_str(unsigned __int64 fname_v) Line 1794 C
rbtest1.exe!rb_load_file(const char * fname) Line 1786 C
rbtest1.exe!main() Line 7 C++
~~~
Tried using both stable 2.2.2 and git master
f965866f4f0a00c8179a1097e89fb4e61f71a92a
Win Server 2012 R2, VS 2013 Update 4. x64.
The AV was due to the following sequence of events, all revolving
around `rb_ensure`.
1. `PUSH_TAG();` creates a local `_tag` on the stack, and sets `th->tag` to
its address.
2. `EXEC_TAG();` calls `setjmp` on this `_tag` object
3. `result = (*b_proc) (data1);` fails with `LoadError` (calls
`load_file_internal` with a nonexistent file, intentionally), setting
`state` to 6.
4. `POP_TAG();` resets `th->tag` to NULL.
5. ` `
~~~c
if (state)
JUMP_TAG(state);
~~~
executes, looks up the current thread, and tries to jump to
~~~c
ruby_longjmp(th->tag->buf, 1);
~~~
but `th->tag` is `NULL`, due to (4) above! So we AV when trying to get `th->tag->buf`.
--
https://bugs.ruby-lang.org/