summaryrefslogtreecommitdiff
path: root/ext/-test-
AgeCommit message (Collapse)Author
6 daysRename `alloca_overflow` to `stack_overflow`Nobuyoshi Nakada
`alloca` is an implementation detail to raise a stack overflow.
2025-12-26Remove `rb_iterate` deprecated since 1.9Nobuyoshi Nakada
2025-12-24ext/-test-/scheduler/scheduler.c: explicitly ignore the result of writeYusuke Endoh
``` 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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
2025-12-16Box: move extensions from namespace to boxNobuyoshi Nakada
2025-12-12Avoid race condition in `test_without_handle_interrupt_signal_works`. (#15504)Samuel Williams
2025-12-10Remove object_id in NEWOBJ tracepoint testJean Boussier
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
2025-12-10Always treat encoding as TYPEDDATAJohn Hawthorn
Encodings are RTypedData, not the deprecated RData. Although the structures are compatible we should use the correct API.
2025-12-10Add `NUM2PTR` and `PTR2NUM` macrosNobuyoshi Nakada
These macros have been defined here and there, so collect them.
2025-12-08Make `ruby_reset_leap_second_info` internalNobuyoshi Nakada
It is exported only for the extension library to test, but the method is no longer used since 29e31e72fb5a14194a78ec974c4ba56c33ad8d45.
2025-12-06Yield to scheduler if interrupts are pending. (#14700)Samuel Williams
2025-12-05Use VWA for bignumJohn Hawthorn
Previously we only allocated bignums from the 40 byte sizepool, and embedded bignum used a fixed size.
2025-12-03fstring_concurrent_set_create: only assert the string has no ivarsJean Boussier
The NEWOBJ tracepoint can generate an object_id, that's alright, what we don't want is actual instance variables.
2025-12-03Rename `rb_obj_exivar_p` -> `rb_obj_gen_fields_p`Jean Boussier
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`.
2025-12-03Handle NEWOBJ tracepoints settings fieldsJean Boussier
[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`.
2025-11-07rename namespace.c (and others) to box.cSatoshi Tagomori
2025-10-09Add Test::Sanitizers.lsan_enabled?Peter Zhu
2025-10-09Rename Test::Sanitizers.enabled? to Test::Sanitizers.asan_enabled?Peter Zhu
2025-10-09Rename ext/-test-/asan to ext/-test-/sanitizersPeter Zhu
2025-10-08[Bug #21629] Initialize `struct RString`Nobuyoshi Nakada
2025-09-02ext/-test-/tracepoint/gc_hook.c: Fix GC safety issueAlan Wu
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.
2025-07-29Fix ext/-test-/namespace/yay{1,2} for mswinNobuyoshi Nakada
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) | ^~~~~~~~~ ```
2025-07-11Update dependencies for addition of set.h to public headersJeremy Evans
2025-05-13Make `waiting_fd` behaviour per-IO. (#13127)Samuel Williams
- `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>
2025-05-11namespace on readSatoshi Tagomori
2025-05-08Add depend files under ext/-test-Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13272
2025-05-08Added depend file for test/-ext-/econv/test_append.rbHiroshi SHIBATA
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
2025-04-17Only test on known good platforms. (#13123)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-04-17Prefer `th->ec` for stack base/size. (#13101)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-04-03Fix timeline_value not being marked in testJohn Hawthorn
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
2025-03-17Manage skipping instance variable IDs in one placeNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12923
2025-01-13Dependency: ext/-test-/memory_status/dependNobuyoshi Nakada
2024-12-27Win32: clean extra object fileNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12481
2024-11-22[Bug #20903] `rb_econv_str_append` arguments expected to be StringNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12145
2024-10-10Cast via `uintptr_t` function pointer between object pointerNobuyoshi Nakada
2024-10-08Cast via `uintptr_t` function pointer between object pointerNobuyoshi Nakada
- ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type
2024-08-20Rewrite #test_redefinition_mismatch to use a dedicated test classKJ Tsanaktsidis
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
2024-08-12Fix memory leak reported in -test-/random/loop.cPeter Zhu
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
2024-08-11Show mkmf.log when failedNobuyoshi Nakada
2024-07-31Reset the counter for two consecutive runsSatoshi Tagomori
Notes: Merged: https://github.com/ruby/ruby/pull/11284
2024-07-30Fix test code and extension to avoid using gvars and Kernel methodsSatoshi Tagomori
Notes: Merged: https://github.com/ruby/ruby/pull/11254
2024-07-30[BUG #20655] Add tests to use rb_ensure and call cont.callSatoshi Tagomori
Notes: Merged: https://github.com/ruby/ruby/pull/11254
2024-07-11Minor: Fix typo in bug nameIvo Anjo
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`.
2024-06-13Add rb_str_resize coderange testtompng
2024-06-10Test `rb_ext_resolve_symbol` without Windows .def filesNobuyoshi Nakada
`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).
2024-06-07[Feature #19998] Untyped Data API has been marked as deprecatedNobuyoshi Nakada
2024-06-04Remove dependency on fiddle from test/rubyHiroshi SHIBATA
Co-authored-by: "Nobuyoshi Nakada" <nobu@ruby-lang.org>
2024-06-02Stop exposing `rb_str_chilled_p`Jean Boussier
[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.
2024-05-28Test for compiling without warnings against public headersMike Dalessio
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]
2024-04-27ruby tool/update-deps --fix卜部昌平
2024-04-24Fix dllimport warningsNobuyoshi Nakada
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) | ^~~~~~~~~~~~~~ ```