General

Profile

jaroslawr (Jarosław Rzeszótko)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

12/21/2014

03:47 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
Maybe someone can now rename this issue to a name better reflecting the actual problem, it seems like a pretty general memory allocation bug that can causes many different code patterns to produce a crash. I also have reproduced the same... jaroslawr (Jarosław Rzeszótko)
03:14 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
A still more simple test case for apparently the same problem:
https://gist.github.com/anonymous/a86f5eb0198acc10ae1e
It really isn't simply an unhandled stack overflow. If you decrease the number of allocations, the program runs j...
jaroslawr (Jarosław Rzeszótko)
03:00 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
Given that this is a BUS error, here is perhaps a particularly interesting backtrace you can get if you are "lucky":
~~~
#0 0xaf9e3187 in _int_memalign (av=av@entry=0xafb00420 <main_arena>, alignment=alignment@entry=16384, bytes=byt...
jaroslawr (Jarosław Rzeszótko)
02:56 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
... way lower than the default ulimit -s of 8192 ***kilobytes***. Wish this bugtracker supported editing ^^ jaroslawr (Jarosław Rzeszótko)
02:55 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
Some more findings, you can run the above test case under gdb like this:
~~~
# gdb ruby
(gdb) set disable-randomization off
(gdb) run test.rb
~~~
The test program does not crash with randomization disabled in gdb, nor does it c...
jaroslawr (Jarosław Rzeszótko)
08:05 AM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
Here is a stripped down and easier to understand test case:
https://gist.github.com/anonymous/a2a784c9f37b1fc6b753
Basically, the bigger the M, the lower N is needed to trigger the crash. On my computer, just nesting 100 lambdas is...
jaroslawr (Jarosław Rzeszótko)
06:34 AM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
I have seen #10460 and would not say this is an obvious duplicate. Here, it is not only that you do not get a stack overflow, it seems that the C stack grows up abnormally quickly when you nest lambdas and method calls, compared to just ... jaroslawr (Jarosław Rzeszótko)

12/20/2014

03:14 PM Ruby Bug #10626: BUS error from nesting lambda's and calls to methods defined with define_method
By the way, even more strange things happen if you replace the simple call to test with something like:
~~~ruby
t1 = Thread.new { test }
t2 = Thread.new { test }
t1.join
t2.join
~~~
I get then the following error:
~~~
test...
jaroslawr (Jarosław Rzeszótko)
03:09 PM Ruby Bug #10626 (Closed): BUS error from nesting lambda's and calls to methods defined with define_method
I get a BUS error from executing the following Ruby program: https://gist.github.com/jaroslawr/8579678d7c68a49208f0
I am on Gentoo Linux and Ruby 2.1.5, and have also tried Ruby 2.1.4, 2.1.3, ..., down to 2.1.0. My colleagues The prob...
jaroslawr (Jarosław Rzeszótko)

Also available in: Atom