Age | Commit message (Collapse) | Author |
|
memory in tests (#33)
https://github.com/ruby/fiddle/commit/e59cfd708a
|
|
https://github.com/ruby/fiddle/commit/1b93a2d9db
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/b04cb92d7b
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/445ca6b501
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/f8fb7c4823
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/9dcf64c096
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/2ce36b1fdc
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
* Allow access to a struct's underlying memory with `struct[offset, length]`.
https://github.com/ruby/fiddle/commit/24083690a6
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
* Allow access to a struct's underlying memory with `struct[offset, length]`.
* Make accessing a struct's underlying memory more convenient.
* refactor memory access unit tests for improved clarity
https://github.com/ruby/fiddle/commit/c082c81bb5
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
https://github.com/ruby/fiddle/commit/8414239ca3
Notes:
Merged: https://github.com/ruby/ruby/pull/3068
|
|
If a module has an origin, and that module is included in another
module or class, previously the iclass created for the module had
an origin pointer to the module's origin instead of the iclass's
origin.
Setting the origin pointer correctly requires using a stack, since
the origin iclass is not created until after the iclass itself.
Use a hidden ruby array to implement that stack.
Correctly assigning the origin pointers in the iclass caused a
use-after-free in GC. If a module with an origin is included
in a class, the iclass shares a method table with the module
and the iclass origin shares a method table with module origin.
Mark iclass origin with a flag that notes that even though the
iclass is an origin, it shares a method table, so the method table
should not be garbage collected. The shared method table will be
garbage collected when the module origin is garbage collected.
I've tested that this does not introduce a memory leak.
This change caused a VM assertion failure, which was traced to callable
method entries using the incorrect defined_class. Update
rb_vm_check_redefinition_opt_method and find_defined_class_by_owner
to treat iclass origins different than class origins to avoid this
issue.
This also includes a fix for Module#included_modules to skip
iclasses with origins.
Fixes [Bug #16736]
Notes:
Merged: https://github.com/ruby/ruby/pull/3136
|
|
It parses a (date)time, not a date.
Notes:
Merged: https://github.com/ruby/ruby/pull/3046
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3134
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3132
|
|
|
|
|
|
This reverts commit c745a60634260ba2080d35af6fdeaaae86fe5193.
This triggers a VM assertion. Reverting until the issue can be
debugged.
|
|
If a module has an origin, and that module is included in another
module or class, previously the iclass created for the module had
an origin pointer to the module's origin instead of the iclass's
origin.
Setting the origin pointer correctly requires using a stack, since
the origin iclass is not created until after the iclass itself.
Use a hidden ruby array to implement that stack.
Correctly assigning the origin pointers in the iclass caused a
use-after-free in GC. If a module with an origin is included
in a class, the iclass shares a method table with the module
and the iclass origin shares a method table with module origin.
Mark iclass origin with a flag that notes that even though the
iclass is an origin, it shares a method table, so the method table
should not be garbage collected. The shared method table will be
garbage collected when the module origin is garbage collected.
I've tested that this does not introduce a memory leak.
This also includes a fix for Module#included_modules to skip
iclasses with origins.
Fixes [Bug #16736]
Notes:
Merged: https://github.com/ruby/ruby/pull/2978
|
|
This reverts an unintentional change in commit
79d9528ddca1dfe2dd99287dc88fd7c2b30f7137.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
|
|
* Suppress unused warnings occurred due to -fno-inline
* Suppress warning occurred due to RUBY_DEBUG=1
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3130
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3130
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3130
|
|
rb_callable_method_entry() creates ccs entry in cc_tbl, but this
code overwrite by insert newly created ccs and overwrote ccs never
freed.
[Bug #16900]
Notes:
Merged: https://github.com/ruby/ruby/pull/3128
|
|
Same as 02705b27be207fce57bd0253251f81108c7ed57b
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/2955433
```
1)
TestGc#test_start_full_mark [/tmp/ruby/v3/src/trunk-random1/test/ruby/test_gc.rb:61]:
Expected :oldmalloc to be nil.
```
|
|
Create a wrapper object first, then buffer allocation which can
fail.
|
|
|
|
This commit just unpins and updates VM references
|
|
|
|
To get rid of a void function at the end of non-void function.
|
|
instead of :TOTAL of ObjectSpace.count_objects.
This test had failed very occasionally:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200521T033004Z.fail.html.gz
```
1) Failure:
TestRubyOptimization#test_block_parameter_should_not_create_objects [/home/chkbuild/chkbuild/tmp/build/20200521T033004Z/ruby/test/ruby/test_optimization.rb:713]:
<0> expected but was
<407>.
```
This test of lazy proc creation checks if no object is created during a
method call. However, calling a method itself increases the count of
objects because method cache is now an object (T_MEMO).
The reason why this test rarely fails is because the test was buggy; it
checked the count of :TOTAL, but :TOTAL count changes only when the GC
heap is expanded. Creating one object rarely causes heap expansion.
The test must have checked not only :TOTAL but also the count of :FREE.
Instead, this change more directly checks :T_DATA. Note that a Proc
object is T_DATA.
|
|
Fix up of 0e3b0fcdba7
From: fd0 (Daisuke Fujimura)
|
|
This is a pure refactoring that improves understanding of what is going
on. Not a big win though.
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Ruby's GC is incremental, meaning that during the mark phase (and also
the sweep phase) programs are allowed to run. This means that programs
can allocate objects before the mark or sweep phase have actually
completed. Those objects may not have had a chance to be marked, so we
can't know if they are movable or not. Something that references the
newly created object might have called the pinning function during the
mark phase, but since the mark phase hasn't run we can't know if there
is a "pinning" relationship.
To be conservative, we must only allow objects that are not pinned but
also marked to move.
|
|
|
|
The GC will not disassemble incomplete instruction sequences. So it is
important that when instructions are being assembled, any objects the
instructions point at should not be moved.
This patch implements a fixed width array that pins its references.
When the instructions are done being assembled, the pinning array goes
away and the objects inside the iseqs are allowed to move.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3125
|
|
|
|
We observed combination of multiple __builtin_assume() can cause
strange compile results on clang-6 (-DNDEBUG exposed this issue).
To avoid this problem, __builtin_assume() is from clang-7.
https://github.com/ruby/ruby/pull/3120#issuecomment-630821333
Notes:
Merged: https://github.com/ruby/ruby/pull/3122
|
|
|
|
On mingw, wmemcpy() is defined as an inline function using
memcpy(), and the static inline wrapper causes a warning.
```
In file included from include/ruby/ruby.h:39,
from win32/file.c:5:
include/ruby/internal/memory.h:284:16: warning: 'ruby_nonempty_memcpy' is static but used in inline function 'wmemcpy' which is not static
284 | #define memcpy ruby_nonempty_memcpy
| ^~~~~~~~~~~~~~~~~~~~
```
|
|
Patch by koshigoe (Masataka SUZUKI). Thanks!
|