summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2020-04-03Fix a typo [ci skip]Kazuhiro NISHIYAMA
2020-04-02[ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada
https://github.com/ruby/etc/commit/25c538120c
2020-04-02Revert "[ruby/etc] Deprecate names under `Struct`"Nobuyoshi Nakada
This reverts commit 69f698d85ada116db5747873e53c597991bedff8. Again.
2020-04-02Revert "[ruby/etc] Hack to get rid of linking against static library"Nobuyoshi Nakada
This reverts commit 5885550c8cb80fb8784598d3af1d90823f4f6604. It didn't work without `--enable-shared`.
2020-04-02[ruby/etc] Hack to get rid of linking against static libraryNobuyoshi Nakada
2020-04-02[ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada
https://github.com/ruby/etc/commit/25c538120c
2020-04-01Revert "[ruby/etc] Deprecate names under `Struct`"Nobuyoshi Nakada
This reverts commit 919b175afc389f8df6a3caa05ffdd28f5fc4bfca. Since 604689628dc64d050a68f1ebe5e06f9105474936, to let `try_run` work before LIBRUBY_SO is installed, `try_link` links against the static library which defines even symbols unexported in the shared library.
2020-04-01[ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada
https://github.com/ruby/etc/commit/25c538120c
2020-04-01[ruby/etc] Drop binary gems supportNobuyoshi Nakada
Revert "Added build:mingw" e1674c18f5a0faf881b362363f428d139baef3b4. https://github.com/ruby/etc/commit/d8f1dd85d3
2020-03-31ext/socket/init.c: do not return uninitialized bufferYusuke Endoh
Resize string buffer only if some data is received in BasicSocket#read_nonblock and some methods. Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2020-03-29Clear all trace events during teardownAlan Wu
Since 0c2d81dada, not all trace events are cleared during VM teardown. This causes a crash when there is a tracepoint for `RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown. The commit looks like a refactoring commit so I think this change was unintentional. [Bug #16682] Notes: Merged: https://github.com/ruby/ruby/pull/2959
2020-03-28The last argument of rb_rescue2() should always be (VALUE)0Benoit Daloze
* Otherwise it might segfault, since C has no idea of the type of varargs, and the C code must assume all varargs are VALUE.
2020-03-21Show libffi version only if setNobuyoshi Nakada
2020-03-15[ruby/stringio] Bump version to 0.1.1Nobuyoshi Nakada
https://github.com/ruby/stringio/commit/05d75e5e66
2020-03-15[ruby/stringio] StringIO#initialize default to the source string encodingJean Boussier
[Bug #16497] https://github.com/ruby/stringio/commit/4958a5ccab
2020-03-12Add workaround for test-bundler failureKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/500526558?check_suite_focus=true#step:16:127 ``` Failures: 1) Bundler.setup when Bundler is bundled doesn't blow up Failure/Error: expect(err).to be_empty expected `"fatal: not a git repository (or any of the parent directories): .git\nfatal: not a git repository (o...the parent directories): .git\nfatal: not a git repository (or any of the parent directories): .git".empty?` to return true, got false Commands: $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle install --retry 0 Resolving dependencies... Using bundler 2.1.4 Bundle complete! 1 Gemfile dependency, 1 gem now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle exec ruby -e \ require\ \'bundler\'\;\ Bundler.setup fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 # ./spec/bundler/runtime/setup_spec.rb:1056:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (2 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:78:in `block (2 levels) in <top (required)>' make: *** [yes-test-bundler] Error 1 ```
2020-03-10openssl: sync with upstream repositoryKazuki Yamaguchi
Import current master (2c43241dc0ed) of ruby/openssl.git. Below are the commits that were made since the last batch at commit b99775b163ce (ruby/openssl.git commit f49e7110ca1e). Note that some of them have been applied already. ---------------------------------------------------------------- Benoit Daloze (1): Remove redundant and ignored workflow file DBL-Lee (1): add support for SHA512_256/SHA512_224 Hiroshi SHIBATA (2): Guard for OpenSSL::PKey::EC::Group::Error with unsupported platforms Fixed inconsistency directory structure with ruby/ruby repo Jeremy Evans (2): Fix keyword argument separation issues in OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock Remove taint support Kazuki Yamaguchi (26): config: support .include directive random: make OpenSSL::Random.pseudo_bytes alias of .random_bytes extconf.rb: get rid of -Werror=deprecated-declarations test/openssl/test_ssl: skip test_fallback_scsv if necessary ts: simplify OpenSSL::Timestamp::Request#algorithm History.md: add missing references to GitHub issues config: deprecate OpenSSL::Config#add_value and #[]= test/openssl/test_ssl: remove sleep from test_finished_messages test/openssl/test_ssl: fix random failure in SSLSocket.open test test/openssl/test_ssl: avoid explicitly-sized private keys test/openssl/test_ssl: remove commented-out test case test/openssl/test_ssl: allow kRSA tests to fail ssl: avoid declarations after statements engine: revert OpenSSL::Engine.load changes for cloudhsm engine: remove really outdated static engines engine: do not check for ENGINE_load_builtin_engines() engine: fix guards for 'dynamic' and 'cryptodev' engines lib/openssl.rb: require openssl/version.rb x509: add error code and verify flags constants ssl: set verify error code in the case of verify_hostname failure .github/workflows: merge CI jobs into a single workflow .github/workflows: test against different OpenSSL versions .travis.yml: fully migrate to GitHub Actions ssl: suppress test failure with SSLContext#add_certificate_chain_file ssl: remove test case test_puts_meta from test_pair Revert "Use version.rb in gemspec" MSP-Greg (2): .travis.yml - remove 2.3/1.0.2, 2.5/1.1.1, head/1.0.2 Use version.rb in gemspec Samuel Williams (1): Restore compatibility with older versions of Ruby. Yusuke Endoh (1): Make OpenSSL::OSSL#test_memcmp_timing robust
2020-03-10digest: do not depend on ext/openssl/deprecation.rbKazuki Yamaguchi
ext/openssl/deprecation.rb has been removed in ext/openssl upstream[1]. It was originally introduced to detect and prevent linking against Apple's bundled (and very outdated) version of OpenSSL. It is long gone and the header files do not exist in current versions of macOS. The dependency in ext/digest was introduced by commit 26e258c807c2. Note that the original issue[2] is resolved without this dependency. The commit also added the pkg_config("openss") call to match what ext/openssl does. [1] https://github.com/ruby/openssl/pull/333 [2] https://bugs.ruby-lang.org/issues/6379
2020-03-08Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSDJeremy Evans
On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In 633a1f15d8228236094ddee12e4e169d655ec49e, the code was modified in a way that it ended up being set to 1 on OpenBSD. However, that results in SIGABRT when running make test-all, inside ffi_closure_free. Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue.
2020-03-07Use osuosl instead of GitHub releasesHiroshi SHIBATA
Because the package provided by GitHub releases is different from sourceware.
2020-03-07Switch to download libffi source package to github releases from sourceware.orgHiroshi SHIBATA
2020-03-05Fixed a typoNobuyoshi Nakada
2020-03-05[ruby/fiddle] always use ffi_closure_alloc on WindowsNobuyoshi Nakada
2020-03-04[ruby/fiddle] use ffi_closure_alloc only with 3.2 or laterNobuyoshi Nakada
2020-03-04[ruby/fiddle] ffi_closure_free is available in the bundled libffiNobuyoshi Nakada
2020-03-04[ruby/fiddle] Use ffi_closure_free if availableNobuyoshi Nakada
2020-03-04Revert "Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)"""Yusuke Endoh
This reverts commit 87f6154bb4c67ca77ee353bb1fe25a922036c0e5. It turned out that the change fails to build on macOS https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20200304T074503Z.fail.html.gz ``` + make 'TESTS=--hide-skip -v fiddle' RUBYOPT=-w test-all dyld: lazy symbol binding failed: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace dyld: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace make: *** [yes-test-all] Abort trap: 6 ```
2020-03-04Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)""Yusuke Endoh
This reverts commit efd641ffab34e433a8d8a7d78914576f2425aa90. This changeset seems to be needed to suppress a warning on Ubuntu 20.04 https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20200304T033004Z.log.html.gz ``` closure.c:264:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations] 264 | result = ffi_prep_closure(pcl, cif, callback, (void *)self); | ^~~~~~ ``` I guess there was a reason why the commit was reverted (maybe some CIs failed?), so try it again.
2020-03-02Add `#write` and `#binwrite` to IO section [ci skip]Kazuhiro NISHIYAMA
2020-02-28Suppress security alertsTakashi Kokubun
https://github.com/advisories/GHSA-jppv-gw3r-w3q8
2020-02-29should not expose hidden object.Koichi Sasada
Hidden object (T_CLASS) can be exposed (BUG). Also rename rb_mInternalObjectWrapper to rb_cInternalObjectWrapper because it is a class.
2020-02-27Merge racc from upstream repository.Hiroshi SHIBATA
* Support Ruby 2.4's frozen string literals. * Remove VCS revisions headers.
2020-02-25ext/-test-/cxxanyargs: use try_link instead卜部昌平
We would like to skip this extension library when libstdc++ is missing. To avoid such situation let's use try_link instead of try_compile.
2020-02-25Fix wrong documentation for return value of Pathname#fnmatchMasataka Pocke Kuwabara
Notes: Merged: https://github.com/ruby/ruby/pull/2923
2020-02-22Introduce disposable call-cache.Koichi Sasada
This patch contains several ideas: (1) Disposable inline method cache (IMC) for race-free inline method cache * Making call-cache (CC) as a RVALUE (GC target object) and allocate new CC on cache miss. * This technique allows race-free access from parallel processing elements like RCU. (2) Introduce per-Class method cache (pCMC) * Instead of fixed-size global method cache (GMC), pCMC allows flexible cache size. * Caching CCs reduces CC allocation and allow sharing CC's fast-path between same call-info (CI) call-sites. (3) Invalidate an inline method cache by invalidating corresponding method entries (MEs) * Instead of using class serials, we set "invalidated" flag for method entry itself to represent cache invalidation. * Compare with using class serials, the impact of method modification (add/overwrite/delete) is small. * Updating class serials invalidate all method caches of the class and sub-classes. * Proposed approach only invalidate the method cache of only one ME. See [Feature #16614] for more details. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-22VALUE size packed callinfo (ci).Koichi Sasada
Now, rb_call_info contains how to call the method with tuple of (mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and mid+argc+flags only requires 64bits. So this patch packed rb_call_info to VALUE (1 word) on such cases. If we can not represent it in VALUE, then use imemo_callinfo which contains conventional callinfo (rb_callinfo, renamed from rb_call_info). iseq->body->ci_kw_size is removed because all of callinfo is VALUE size (packed ci or a pointer to imemo_callinfo). To access ci information, we need to use these functions: vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci). struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg. rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc() is temporary removed because cd->ci should be marked. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-20ext/-test-/cxxanyargs: prevent have_devel check卜部昌平
The `cxx.try_compile` command in this file kicks `cxx.have_devel?` internally, which recursively calls `cxx.try_link` with a different source code. We don't want that happen (the source code compiled in this file must be the first one). We need to fake the system.
2020-02-18[ruby/io-console] bump up to 0.5.6Nobuyoshi Nakada
2020-02-18[ruby/io-console] Just ignore the extension on other than CRubyNobuyoshi Nakada
https://github.com/ruby/io-console/commit/41b6f09574
2020-02-17[ruby/openssl] ts: simplify OpenSSL::Timestamp::Request#algorithmKazuki Yamaguchi
Stop the special treatment of invalid hashAlgorithm of the message imprint. Those invalid values can only appear after the object is instantiated, before the user sets an actual message digest algorithm. OpenSSL::Timestamp::TokenInfo#algorithm already does the same. Also, remove the test case "test_create_request" since it does not make much sense. Those fields are to be set by the user after creation of the object and checking the initial value is pointless. Fixes: https://github.com/ruby/openssl/issues/335 https://github.com/ruby/openssl/commit/890a6476fa
2020-02-17[ruby/io-console] [DOC] Improved about `intr:`Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/82b630cd79
2020-02-16ext/openssl/extconf.rb: avoid -Werror=deprecated-declarationsYusuke Endoh
It fails to build on Solaris: https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200216T090008Z.log.html.gz ``` ossl_cipher.c: 関数 ‘ossl_cipher_init’ 内: ossl_cipher.c:228:2: エラー: ‘EVP_md5’ is deprecated [-Werror=deprecated-declarations] 228 | EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv, | ^~~~~~~~~~~~~~ In file included from /usr/include/openssl/x509.h:73, from /usr/include/openssl/x509v3.h:63, from ossl.h:23, from ossl_cipher.c:10: /usr/include/openssl/evp.h:732:26: 備考: ここで宣言されています 732 | DEPRECATED const EVP_MD *EVP_md5(void); | ^~~~~~~ ```
2020-02-16Import openssl-2.2.0 (#2693)Hiroshi SHIBATA
Import the master branch of ruby/openssl for preparing to release openssl-2.2.0 Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2020-02-15Workaround for bison provided by scoop on mswin environmentHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/2909
2020-02-15Fix call-seq of Pathname#{,l}ch{mod,own} [ci skip]Kazuhiro NISHIYAMA
2020-02-14[ruby/io-console] Prefer keyword argumentsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/5facbfc4c8
2020-02-09Fix readline build dependencyAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/2895
2020-02-09[ruby/readline-ext] Use rake/extensiokntask to buildaycabta
https://github.com/ruby/readline-ext/commit/b0b5f709bd
2020-02-09[ruby/readline-ext] Add spec.extensionsaycabta
https://github.com/ruby/readline-ext/commit/8c33abb13c
2020-02-09[ruby/readline-ext] The ruby/assert.h is adopted by Ruby 2.7 or lateraycabta
https://github.com/ruby/readline-ext/commit/106c31fc1b