Age | Commit message (Collapse) | Author |
|
If the tables are null (which happens when a GC is ran at boot), it will
segfault when trying to iterate.
Notes:
Merged: https://github.com/ruby/ruby/pull/12591
|
|
As `SET_STACK_END` updates `ec->machine.stack_end`, it cannot be
const.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12582
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12459
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12468
|
|
We must disable GC when running RUBY_INTERNAL_EVENT_NEWOBJ hooks because
the callback could call xmalloc which could potentially trigger a GC,
and a lot of code is unsafe to trigger a GC right after an object has
been allocated because they perform initialization for the object and
assume that the GC does not trigger before then.
Notes:
Merged: https://github.com/ruby/ruby/pull/12419
|
|
Such as `$(ruby_version)`, `$(arch)` and so on.
Notes:
Merged: https://github.com/ruby/ruby/pull/12428
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12428
|
|
If we don't have the VM (e.g. printing memory leaks in LSAN after shutdown)
then we will crash when we try to print the bug report. This issue was
reported in: https://github.com/ruby/ruby/pull/12309#issuecomment-2555766525
Notes:
Merged: https://github.com/ruby/ruby/pull/12413
|
|
[Bug #20942]
If we've raised a memerror while the VM is locked, and the tag we're
jumping to has been locked at a different level to the current lock (ie.
we've locked the VM again since the tag we're jumping to) then we should
consider this memerror fatal and exit, since the tag cannot unlock the
VM.
Co-Authored-By: Peter Zhu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/12393
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
This change poisons the whole slot of the object rather than just the flags.
This allows ASAN to find any reads/writes into the slot after it has been
freed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
rb_gc_location doesn't check that the object is actually a Ruby object
and only checks if the object looks like a T_MOVED. This may have unexpected
outcomes if the object is not a Ruby object (e.g. a piece of malloc memory
may be corrupted).
Notes:
Merged: https://github.com/ruby/ruby/pull/12371
|
|
Use the wrapper gc_location_internal instead that checks for special
constants.
Notes:
Merged: https://github.com/ruby/ruby/pull/12359
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12359
|
|
When reference updating ObjectSpace.trace_object_allocations, we need to
check whether the object is valid or not because it does not mark the
object so the object may be dead. This can cause a segmentation fault
if the object is on a free heap page.
For example, the following script crashes:
require "objspace"
objs = []
ObjectSpace.trace_object_allocations do
1_000_000.times do
objs << Object.new
end
end
objs = nil
# Free pages that the objs were on
GC.start
# Run compaction and check that it doesn't crash
GC.compact
Notes:
Merged: https://github.com/ruby/ruby/pull/12360
|
|
This will give us the Ruby stack trace when an ASAN error is reported.
Notes:
Merged: https://github.com/ruby/ruby/pull/12309
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12307
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12271
|
|
We have name fragmentation for this feature, including "shared GC",
"modular GC", and "external GC". This commit standardizes the feature
name to "modular GC" and the implementation to "GC library".
Notes:
Merged: https://github.com/ruby/ruby/pull/12261
|
|
We can use the BUILDING_SHARED_GC flag to check if we're building gc_impl.h
as a shared GC or building the default GC.
Notes:
Merged: https://github.com/ruby/ruby/pull/12243
|
|
Copy from gc/default/default.c and revert the part of 51bd81651794.
Notes:
Merged: https://github.com/ruby/ruby/pull/12260
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12242
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12204
|
|
This could be out of GVL
Notes:
Merged: https://github.com/ruby/ruby/pull/12188
|
|
Let there be rooms for each GC implementations how to handle multi
threaded situations. They can be totally reentrant, or can have
their own mutex, or can rely on rb_thread_call_with_gvl.
In any ways the allocator (has been, but now officially is)
expected to run properly without a GVL. This means there need be
a way for them to inform the interpreter about their allocation
failures, without relying on raising exceptions.
Let them do so by returning NULL.
Notes:
Merged: https://github.com/ruby/ruby/pull/12188
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12149
|
|
So that it doesn't get included in the generated binaries for builds
that don't support loading shared GC modules
Co-Authored-By: Peter Zhu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/12149
|
|
Co-Authored-By: Peter Zhu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/12149
|
|
```
compiling gc.c
In file included from gc.c:80:
/usr/include/sys/prctl.h:88:8: error: redefinition of 'struct prctl_mm_map'
88 | struct prctl_mm_map {
| ^~~~~~~~~~~~
In file included from gc.c:79:
/usr/include/linux/prctl.h:134:8: note: originally defined here
134 | struct prctl_mm_map {
| ^~~~~~~~~~~~
```
The first include is not needed and is what causes this issue.
Two other places in ruby exclusively use the sys import.
See https://github.com/seccomp/libseccomp/issues/19 for a similar problem.
Notes:
Merged: https://github.com/ruby/ruby/pull/12154
|
|
Use PR_SET_VMA_ANON_NAME to set human-readable names for anonymous
virtual memory areas mapped by `mmap()` when compiled and run on Linux
5.17 or higher. This makes it convenient for developers to debug mmap.
Notes:
Merged: https://github.com/ruby/ruby/pull/12119
|
|
Also fix the message, just `RB_GC_MAX_NAME_LEN` chars long is OK.
|
|
|
|
This avoids the need to malloc, and reduces the complexity of truncating
the long string for display in RUBY_DESCRIPTION.
The developer of a GC implementation should be responsible for giving it
a succinct name.
Notes:
Merged: https://github.com/ruby/ruby/pull/11872
|
|
This will add +MOD_GC to the version string and Ruby description when
Ruby is compiled with shared gc support.
When shared GC support is compiled in and a GC module has been loaded
using RUBY_GC_LIBRARY, the version string will include the name of
the currently active GC as reported by the rb_gc_active_gc_name function
in the form
+MOD_GC[gc_name]
[Feature #20794]
Notes:
Merged: https://github.com/ruby/ruby/pull/11872
|
|
And a default and readonly key to the GC.config hash that names the
current GC implementation.
This is provided by each implementation by the API function
rb_gc_impl_active_gc_name
Notes:
Merged: https://github.com/ruby/ruby/pull/11872
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11932
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11932
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11932
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11932
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11932
|
|
If there's a crash after rb_gc_obj_free, it's hard to debug because the
flags have been cleared out already.
Notes:
Merged: https://github.com/ruby/ruby/pull/11925
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11904
|
|
Instead of passing the full GC SO file name to RUBY_GC_LIBRARY, we now
only need to pass the GC name.
For example, before we needed to pass `RUBY_GC_LIBRARY=librubygc.default.so`
but now we only need to pass `RUBY_GC_LIBRARY=default`.
Notes:
Merged: https://github.com/ruby/ruby/pull/11866
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11870
|
|
- ISO C forbids conversion of function pointer to object pointer type
- ISO C forbids conversion of object pointer to function pointer type
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11817
|
|
Before this commit, when there is an error in loading the shared GC, an
error was outputted but it did not exit, causing it to segfault later on.
Notes:
Merged: https://github.com/ruby/ruby/pull/11784
|
|
Now that we've inlined the eden_heap into the size_pool, we should
rename the size_pool to heap. So that Ruby contains multiple heaps, with
different sized objects.
The term heap as a collection of memory pages is more in memory
management nomenclature, whereas size_pool was a name chosen out of
necessity during the development of the Variable Width Allocation
features of Ruby.
The concept of size pools was introduced in order to facilitate
different sized objects (other than the default 40 bytes). They wrapped
the eden heap and the tomb heap, and some related state, and provided a
reasonably simple way of duplicating all related concerns, to provide
multiple pools that all shared the same structure but held different
objects.
Since then various changes have happend in Ruby's memory layout:
* The concept of tomb heaps has been replaced by a global free pages list,
with each page having it's slot size reconfigured at the point when it
is resurrected
* the eden heap has been inlined into the size pool itself, so that now
the size pool directly controls the free_pages list, the sweeping
page, the compaction cursor and the other state that was previously
being managed by the eden heap.
Now that there is no need for a heap wrapper, we should refer to the
collection of pages containing Ruby objects as a heap again rather than
a size pool
Notes:
Merged: https://github.com/ruby/ruby/pull/11771
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11764
|