| Age | Commit message (Collapse) | Author |
|
`alloca` is an implementation detail to raise a stack overflow.
|
|
|
|
```
scheduler.c:44:5: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
44 | write(blocking_state->notify_descriptor, "x", 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
|
|
|
|
|
|
Generating an object_id for any type other than T_OBJECT (and T_CLASS)
will inevitably allocate an IMEMO/fields objects, which isn't supported
in a NEWOBJ tracepoint.
See: https://bugs.ruby-lang.org/issues/21710#note-23
|
|
Encodings are RTypedData, not the deprecated RData. Although the
structures are compatible we should use the correct API.
|
|
These macros have been defined here and there, so collect them.
|
|
It is exported only for the extension library to test, but the method
is no longer used since 29e31e72fb5a14194a78ec974c4ba56c33ad8d45.
|
|
|
|
Previously we only allocated bignums from the 40 byte sizepool, and
embedded bignum used a fixed size.
|
|
The NEWOBJ tracepoint can generate an object_id, that's alright,
what we don't want is actual instance variables.
|
|
The "EXIVAR" terminology has been replaced by "gen fields"
AKA "generic fields".
Exivar implies variable, but generic fields include more than
just variables, e.g. `object_id`.
|
|
[Bug #21710]
- struct.c: `struct_alloc`
It is possible for a `NEWOBJ` tracepoint call back to write fields
into a newly allocated object before `struct_alloc` had the time
to set the `RSTRUCT_GEN_FIELDS` flags and such.
Hence we can't blindly initialize the `fields_obj` reference to `0`
we first need to check no fields were added yet.
- object.c: `rb_class_allocate_instance`
Similarly, if a `NEWOBJ` tracepoint tries to set fields on the object,
the `shape_id` must already be set, as it's required on T_OBJECT to
know where to write fields.
`NEWOBJ_OF` had to be refactored to accept a `shape_id`.
|
|
|
|
|
|
|
|
|
|
|
|
TestTracepointObj#test_teardown_with_active_GC_end_hook was failing on
some platforms due to a Proc that is not marked being passed around.
Neither rb_tracepoint_new() nor rb_postponed_job_preregister() promise
to mark their callback `void *data`.
https://rubyci.s3.amazonaws.com/osx1300arm/ruby-master/log/20250902T154504Z.fail.html.gz
Add a GC.start to make the test a better detector for this safety issue
and fix it by getting the Proc from an ivar on the rooted module.
|
|
Visual C:
```
compiling ../../../../../src/ext/-test-/namespace/yay1/yay1.c
yay1.c
../../../../../src/ext/-test-/namespace/yay1/yay1.c(4): warning C4273: 'yay_value': inconsistent dll linkage
C:\a\ruby\ruby\src\ext\-test-\namespace\yay1\yay1.h(4): note: see previous definition of 'yay_value'
linking shared-object -test-/namespace/yay1.so
Creating library yay1-arm64-mswin64_140.lib and object yay1-arm64-mswin64_140.exp
yay1-arm64-mswin64_140.exp : warning LNK4070: /OUT:yay1.dll directive in .EXP differs from output filename '..\..\..\..\.ext\arm64-mswin64_140\-test-\namespace\yay1.so'; ignoring directive
compiling ../../../../../src/ext/-test-/namespace/yay2/yay2.c
yay2.c
../../../../../src/ext/-test-/namespace/yay2/yay2.c(4): warning C4273: 'yay_value': inconsistent dll linkage
C:\a\ruby\ruby\src\ext\-test-\namespace\yay2\yay2.h(4): note: see previous definition of 'yay_value'
linking shared-object -test-/namespace/yay2.so
Creating library yay2-arm64-mswin64_140.lib and object yay2-arm64-mswin64_140.exp
yay2-arm64-mswin64_140.exp : warning LNK4070: /OUT:yay2.dll directive in .EXP differs from output filename '..\..\..\..\.ext\arm64-mswin64_140\-test-\namespace\yay2.so'; ignoring directive
```
From MinGW gcc:
```
../../../../../src/ext/-test-/namespace/yay1/yay1.c:4:1: warning: 'yay_value' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
4 | yay_value(void)
| ^~~~~~~~~
../../../../../src/ext/-test-/namespace/yay2/yay2.c:4:1: warning: 'yay_value' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
4 | yay_value(void)
| ^~~~~~~~~
```
|
|
|
|
- `rb_thread_fd_close` is deprecated and now a no-op.
- IO operations (including close) no longer take a vm-wide lock.
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13272
|
|
https://github.com/ruby/ruby/commit/ce51ef30df5bf07ec3881a377f0011b8f20ec507 broke
ext/-test-/econv/append.o. We should rebuild that object file when dependencies are updated.
Notes:
Merged: https://github.com/ruby/ruby/pull/13271
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
T_DATA with a NULL pointer are not marked. Let's wrap 1 instead to
ensure that our mark function is actually run.
Notes:
Merged: https://github.com/ruby/ruby/pull/13047
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12923
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12481
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12145
|
|
|
|
- ISO C forbids conversion of function pointer to object pointer type
- ISO C forbids conversion of object pointer to function pointer type
|
|
This test is checking what happens if you try and define a class in a C
extension where that constant is already not a class. It was doing this
by overriding ::Date and then trying to require 'date. The issue with
this is that if we ever add 'date' as a dependency for the test runner,
this test will break because the test runner files get implicitly
required in an `assert_separately` block.
Better use an explicit class for this purpose which can't be accidentally
required elsewhere.
Notes:
Merged: https://github.com/ruby/ruby/pull/11400
|
|
RUBY_TYPED_DEFAULT_FREE will only free the rand_loop_t, but it will cause
the buf to be leaked. This commit fixes the memory leak by implementing
a free function for the rand_loop_t type.
Notes:
Merged: https://github.com/ruby/ruby/pull/11354
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11284
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11254
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11254
|
|
This confused me for a few minutes -- the testcase for
https://bugs.ruby-lang.org/issues/14834 was mistyped in the file name,
as well as once in the source.
E.g. in some cases it was
`one-four-three-eight-four` instead of
`one-four-eight-three-four`.
|
|
|
|
`RUBY_FUNC_EXPORTED` is working on Windows since 906a86e4de71061dca05.
And as .def files are not processed by the preprocessor, it is less
flexible than `RUBY_FUNC_EXPORTED`, (e.g., select symbols by
conditions such as ruby version).
|
|
|
|
Co-authored-by: "Nobuyoshi Nakada" <nobu@ruby-lang.org>
|
|
[Feature #20205]
Now that chilled strings no longer appear as frozen, there is no
need to offer an API to check for chilled strings.
We however need to change `rb_check_frozen_internal` to no
longer be a macro, as it needs to check for chilled strings.
|
|
Under compilers with WERRORFLAG, MakeMakefile.try_compile treats
warnings as errors, so we can use append_cflags to test whether the
public header files emit warnings with certain flags turned on.
[Regression test for feature #20507]
|
|
|
|
From Visual C:
```
../../../../../src/ext/-test-/load/resolve_symbol_target/resolve_symbol_target.c(5): warning C4273: 'rst_any_method': inconsistent dll linkage
D:\a\ruby\ruby\src\ext\-test-\load\resolve_symbol_target\resolve_symbol_target.h(4): note: see previous definition of 'rst_any_method'
../../../../../src/ext/-test-/load/stringify_target/stringify_target.c(5): warning C4273: 'stt_any_method': inconsistent dll linkage
D:\a\ruby\ruby\src\ext\-test-\load\stringify_target\stringify_target.h(4): note: see previous definition of 'stt_any_method'
```
From MinGW gcc:
```
../../../../../src/ext/-test-/load/resolve_symbol_target/resolve_symbol_target.c:5:1: warning: 'rst_any_method' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
compiling ../../../../../src/ext/-test-/marshal/compat/usrcompat.c
5 | rst_any_method(VALUE klass)
| ^~~~~~~~~~~~~~
../../../../../src/ext/-test-/load/stringify_target/stringify_target.c:5:1: warning: 'stt_any_method' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
5 | stt_any_method(VALUE klass)
| ^~~~~~~~~~~~~~
```
|