summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-22Removed extra assertions for Ruby 3.2Hiroshi SHIBATA
2024-11-22Fix flaky "Expected 499 to be >= 500" assertion in test_gc_compact.rbKJ Tsanaktsidis
There have been some sproradically flaky tests related to GC compaction, which fail with: 1) Failure: TestGCCompact#test_moving_hashes_down_size_pools [/test/ruby/test_gc_compact.rb:442]: Expected 499 to be >= 500. What's happening here, is that, _sometimes_, depending on very unlucky combinations of machine things, one of the expected-to-be-moved hashes might be found on the machine stack during GC, and thus pinned. One factor which seems to make this _more_ likely is that GCC 11 on Ubuntu 22.04 seems to want to allocate 440 bytes of stack space for `gc_start`, which is much more than it actually uses on the common code path. The result is that there are some 50-odd VALUE-sized cells "live" on the stack which may well contain valid heap pointers from previous function calls, and will need to be pinned. This is, of course, totally normal and expected; Ruby's GC is conservative and if there is the possibility that a VALUE might be live on the machine stack, it can't be moved. However, it does make these tests flaky. This commit "fixes" the tests by performing the work in a fiber; the fiber goes out of scope and should be collected by the call to verify_compaction_references, so there should be no references to the to-be-moved objects floating around on the machine stack. Fixes [#20021]
2024-11-22Assert that at least one element has been embeddedPeter Zhu
It's not guaranteed that the first element will always be embedded.
2024-11-22Assert that resizing arrays will re-embed themPeter Zhu
2024-11-22Assert that resizing objects will re-embed themPeter Zhu
2024-11-22Fix Error in GC Compaction specsMatt Valentine-House
Previously if any of the tests that move objects between size pools failed to move anything, then the call to stats.dig would return `nil` which would then cause assert_operator to error. This should be a test Failure, rather than an Error so this commit uses a default value of 0 if stats.dig fails to find a key. Also refactor object movement tests to use stats.dig, rather than :[]
2024-11-19Make `rb_ec_set_vm_stack` conformant to the C++11 requirementNobuyoshi Nakada
Https://learn.microsoft.com/en-us/cpp/build/reference/zc-inline-remove-unreferenced-comdat?view=msvc-140 > If `/Zc:inline` is specified, the compiler enforces the C++11 > requirement that all functions declared inline must have a definition > available in the same translation unit if they're used.
2024-11-19Win32: Remove unreferenced COMDAT from object filesNobuyoshi Nakada
Windows 11 SDK Version 10.0.26100.0 introduced a new internal inline function in ucrt/corecrt_math.h. Even it appears in object files and will be included in the DEF file, it will be removed from the DLL and result in a linker error.
2024-11-19Win32: Expose wchar main routine onlyNobuyoshi Nakada
Warned if both of `main` and `wmain` are exposed: ``` LINK : warning LNK4067: ambiguous entry point; selected 'mainCRTStartup' ```
2024-11-19Make `MUNICODE_FLAG` simply expandedNobuyoshi Nakada
It is not expected that `target_os` will change going forward.
2024-11-19`EXE_LDFLAGS` uses the same `MUNICODE_FLAG`Daisuke Fujimura (fd0)
2024-11-19`-municode` is available for MinGW-w64 targets onlyDaisuke Fujimura (fd0)
2024-11-19Use wide character startupNobuyoshi Nakada
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line contains characters that are not supported in the active code page". https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/ Already Ruby builds `argv` in `rb_w32_sysinit`, instead of mswin- or mingw-made `argv`. Just bypass the conversion in mingw crt.
2024-11-19[ruby/net-http] test_https.rb - fix test_session_reuse_but_expireMSP-Greg
https://github.com/ruby/net-http/commit/5544243c41
2024-11-19[ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standardsJob Snijders
RFC 2986, section 4.1 only defines version 1 for CSRs. This version is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version to anything but 1 fails. Do not attempt to generate a CSR with invalid version (which now fails) and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its subject rather than using an invalid version. This commit fixes the following error. ``` 2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError: X509_REQ_set_version: passed invalid argument /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version=' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in `test_version' 40: req = OpenSSL::X509::Request.new(req.to_der) 41: assert_equal(0, req.version) 42: => 43: req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256')) 44: assert_equal(1, req.version) 45: req = OpenSSL::X509::Request.new(req.to_der) 46: assert_equal(1, req.version) ``` https://github.com/ruby/openssl/commit/c06fdeb091
2024-11-19Update minitest-5.25.1Hiroshi SHIBATA
5.16.3 is flaky with `make test-bundled-gems` https://github.com/ruby/actions/actions/runs/11898853810/job/33156475298
2024-11-10merge revision(s) d71be7274bd2623bb521be72c245c08fc38d6ae4: [Backport #20873]nagachika
[Bug #20873] Consider `-FIXNUM_MIN` overflow `-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using two's complement representation.
2024-11-10Fix update_coderange for binary stringsJohn Hawthorn
Although a binary (aka ASCII-8BIT) string will never have a broken coderange, it still has to differentiate between "valid" and "7bit". On Ruby 3.4/trunk this problem is masked because we now clear the coderange more agressively in rb_str_resize, and we happened to always be strinking this string, but we should not assume that. On Ruby 3.3 this created strings where `ascii_only?` was true in cases it shouldn't be as well as other problems. Fixes [Bug #20883] Co-authored-by: Daniel Colson <danieljamescolson@gmail.com> Co-authored-by: Matthew Draper <matthew@trebex.net>
2024-11-10merge revision(s) 56ecc243e230e8e99761ec0ffc5116601f094bb0: [Backport #20868]nagachika
[Bug #20868] Fix Method#hash to not change after compaction The hash value of a Method must remain constant after a compaction, otherwise it may not work as the key in a hash table. For example: def a; end # Need this method here because otherwise the iseq may be on the C stack # which would get pinned and not move during compaction def get_hash method(:a).hash end puts get_hash # => 2993401401091578131 GC.verify_compaction_references(expand_heap: true, toward: :empty) puts get_hash # => -2162775864511574135
2024-11-10merge revision(s) 29c480dd6fca993590c82078ba797e2c4e876ac7: [Backport #20853]nagachika
[Bug #20853] Fix Proc#hash to not change after compaction The hash value of a Proc must remain constant after a compaction, otherwise it may not work as the key in a hash table.
2024-11-10backport 2a5354e59324cb296a423c73ec15ff9191086964 partially to make ↵nagachika
rb_any_hash() non-static.
2024-11-06We should support ruby/spec with Ruby 3.1 and 3.2Hiroshi SHIBATA
2024-11-06Skip MinGW failure with GitHub Actions updateHiroshi SHIBATA
We should fix this later
2024-11-06Partly reverted from 449899b38314d0ecbe61e42d34398bdf2561b8e9Hiroshi SHIBATA
2024-11-06Pend some tests because these are not working with macOS 15 and Xcode 16Hiroshi SHIBATA
2024-11-06Export homebrew's bison path to PATH environmental variableHiroshi SHIBATA
2024-11-06Retired macos-12 and added macos-14 and macos-15 on GitHub ActionsHiroshi SHIBATA
2024-11-06Fix test tail with mjit options for clang provided by Xcode 16Hiroshi SHIBATA
``` clang: error: unknown argument '-emit-pch'; did you mean '-Xclang -emit-pch'? MJIT warning: Making precompiled header failed on compilation. Stopping MJIT worker... Successful MJIT finish ```
2024-10-30bump teenyv3_2_6nagachika
2024-10-28merge revision(s) 70d20ce473952e3a2e5b0aa4a6884886517ee3cc:nagachika
Update bundled gems list
2024-10-20merge revision(s) ce20367a0e2f1fcfabebf3b6bea732fc71fa79f7: [Backport #20500]nagachika
Define `incflags` also on mswin
2024-10-20merge revision(s) bcb3247072e6973d0f6b50ca5fed238d5824bd28: [Backport #20500]nagachika
[Bug #19778] Pass additional include options to INCFLAGS in common.mk
2024-10-20merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]nagachika
[Bug #20500] Search non-default directories for jemalloc Co-Authored-by: lish82 (Hiroki Katagiri)
2024-10-18merge revision(s) 6118e8a47394409b53164b60e79fadf348b97db3, ↵nagachika
dc64448202299633a235f310b8bf2192263f274f: [Backport #20716] Fix method caching bug when including/prepend module A that prepends module B Fix by always adding the generated iclass to the subclasses list, otherwise the method cache for the iclass is not cleared when the method in the module is overwritten. Fixes [Bug #20716] Remove an unused variable
2024-10-18merge revision(s) 35e124832e29b65c84d4e0e4e434616859f9bdf5: [Backport #20755]nagachika
[Bug #20755] Frozen string should not be writable via IO::Buffer
2024-10-18Disabled annocheck same as f5b6b3dba7b32dcd1f15c150dd78dce6c0d92b1eHiroshi SHIBATA
2024-10-18.travis.yml: Drop all the pipelines due to jobs not starting.Jun Aruga
Remove `.travis.yml` as a temporary workaround.
2024-10-18-l option of 7z is unknown switch with the `ubuntu-latest`.Hiroshi SHIBATA
https://github.com/ruby/actions/actions/runs/11095032727/job/30823174026#step:3:349
2024-10-18merge revision(s) 637067440f74043c6d79fc649ab8acf1afea25a5: [Backport #20752]nagachika
[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly
2024-10-18merge revision(s) c1862cbb89a6bf42dcd07d92fe4f4bfeebca5775: [Backport #20719]nagachika
[Bug #20719] `Float` argument must be ASCII compatible
2024-10-18merge revision(s) d33e3d47b84a73b38644f2a3d41881ce9be6ef18: [Backport #20704]nagachika
[Bug #20704] Win32: Fix chdir to non-ASCII path On Windows, `chdir` in compilers' runtime libraries uses the active code page, but command line arguments in ruby are always UTF-8, since commit:33ea2646b98adb49ae2e1781753bf22d33729ac0.
2024-10-04Add `IO::Buffer` tests for read and write with length & offset.Samuel Williams
2024-10-04Fix size calcuation when offset is given + updated documentation.Samuel Williams
2024-09-26merge revision(s) 0d16c36d0ab2afa2ec79b72b229e69c141ebdaba: [Backport #13831]nagachika
[win32/registry] Fallback to UTF-8 for unknown codepages There are some codepages like cp708 for which no ruby encoding exists: $ ruby -e "Encoding.find('cp708')" Traceback (most recent call last): 1: from -e:1:in `<main>' -e:1:in `find': unknown encoding name - cp708 (ArgumentError) win32/registry uses ENCODING to transcode error messages and expand environment variables from UTF-16LE, so using UTF-8 seems like the best choice and is better than a hard failure. This should resolve [Bug #13831]
2024-08-31merge revision(s) 29500e3034681a30045dea462d6bb653e8600738: [Backport #20698]nagachika
Update bundled gems list as of 2024-08-22
2024-08-31merge revision(s) bb849ffdb18305f01457de4e9848c830eb83a2d7:nagachika
Added explicitly begin-end block for Ruby 2.4. strscan, ipaddr and some default gems still support Ruby 2.4. After this, I extract this CoreAssertions to their repositories.
2024-08-31merge revision(s) 8a7e6f6852740e989ef8f679db5631306466a4ed:nagachika
Improve base time of assert_linear_performance (#11369) Remove `.ceil` from base time calculation that makes 10x gap. This will make the assertion more strict and also less flaky.
2024-08-31merge revision(s) f1c78b23313e63eb31a213cc7277b1eb206a581b:nagachika
Suppress warning for shadowing outer local variable
2024-08-31merge revision(s) d23964360335ad561f252cb6fe8e90df7ebee90e:nagachika
core_assertions.rb: Support old rubies Some symbol argument might not be accepted by Process.clock_gettime.
2024-08-31merge revision(s) 533423ebe46ebfe3005198c12aa0d2c899c695ea:nagachika
core_assertions.rb: Prefer CPU time clocks To prevent influence from other processes.