Commit graph

63490 commits

Author SHA1 Message Date
Aaron Patterson
3dc313a239 Don't pin objects if we're just walking the heap
Walking the heap can inadvertently pin objects.  Only mark the object's
pin bit if the mark_func_data pointer is NULL (similar to the mark bits)
2020-08-03 12:28:00 -07:00
Hiroshi SHIBATA
1d637b1f5e [ruby/weakref] Use Gemfile instead of Gem::Specification#add_development_dependency.
10d547ba12
2020-08-03 19:46:39 +09:00
Hiroshi SHIBATA
9e93596d7b [ruby/ostruct] Drop to Ruby 2.4
00e8fe3df2
2020-08-03 19:42:06 +09:00
Jeremy Evans
85dc570893 [ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+
5ae9620fbc
2020-08-03 18:56:14 +09:00
Jeremy Evans
20eb9e98b6 [ruby/net-http] Switch invalid server name format
invalid_servername is not a valid name in an SSL request due to
the use of the underscore, and LibreSSL 3.2.0 will raise an
exception for this.  These tests are not testing the allowed
characters in the server name, but how net/http handles cases where
the server name provided does not match the IP address you are
trying to connect to, so I think it's better to just modify the
tests to use a correct format.

While here, fix a typo in a test name, and use better code in the
ensure block so the same test doesn't issue both a failure and an
error.

0e8dc91120
2020-08-03 18:55:44 +09:00
Hiroshi SHIBATA
e732d376af [ruby/cgi] Drop to Ruby 2.4
8a86536e94
2020-08-03 18:30:19 +09:00
Hiroshi SHIBATA
3ec860ae88
net-ftp is under lib/net instead of lib/net/ftp 2020-08-03 17:52:01 +09:00
Hiroshi SHIBATA
2346e2f0db
Followed up b2d96abb42 for net-ftp. 2020-08-03 17:40:05 +09:00
git
1cc91b6341 * 2020-08-03 [ci skip] 2020-08-03 01:58:24 +09:00
Alan Wu
c987be2552 Improve docs for Module#remove_class_variable [ci skip] 2020-08-02 12:56:06 -04:00
Alan Wu
ac69849e49 Enable an assert on all configs for debugging
I'm trying to get a better understanding for rare crashes that happen on
ci:
 - http://ci.rvm.jp/results/trunk_clang_10@silicon-docker/3101898
 - http://ci.rvm.jp/results/trunk-test@ruby-sky1/2777695

Looking at the stack trace it looks like a type confusion possibly
induced by heap corruption. I'm hoping to verify this theory.
2020-08-01 23:05:19 -04:00
Koichi Sasada
a1246270c5 remove accidentally introduced debug code 2020-08-02 04:51:26 +09:00
Koichi Sasada
b4f58ea300 support multiple filters by RUBY_DEBUG_LOG_FILTER
Now you can specify multiple filters for RUBY_DEBUG_LOG output
by RUBY_DEBUG_LOG_FILTER=a,b,c (in this case, logs that the
function name contains a, b or c).
2020-08-02 04:24:47 +09:00
Koichi Sasada
f7cf600c8b fix mark bit operation.
To optimize the sweep phase, there is bit operation to set mark
bits for out-of-range bits in the last bit_t.
However, if there is no out-of-ragnge bits, it set all last bit_t
as mark bits and it braek the assumption (unmarked objects will
be swept).
GC_DEBUG=1 makes sizeof(RVALUE)=64 on my machine and this condition
happens.

It took me one Saturday to debug this.
2020-08-02 03:31:58 +09:00
git
d5bed28889 * 2020-08-02 [ci skip] 2020-08-02 01:07:29 +09:00
Kazuki Tsujimoto
fcdbdff631
rb_{ary,fnd}_pattern_info: Remove imemo member to reduce memory usage
This is a partial revert commit of 8f096226e1.

NODE layout:

  Before:

       | ARYPTN | FNDPTN | HSHPTN
    ---+--------+--------+-----------
    u1 | pconst | pconst | pconst
    u2 | unused | unused | pkwargs
    u3 | apinfo | fpinfo | pkwrestarg

  After:

       | ARYPTN | FNDPTN | HSHPTN
    ---+--------+--------+-----------
    u1 | imemo  | imemo  | pkwargs
    u2 | pconst | pconst | pconst
    u3 | apinfo | fpinfo | pkwrestarg
2020-08-02 01:04:06 +09:00
Nobuyoshi Nakada
b6175c9e4f
mswin build - install src zlib files after checkout
actions/checkout deletes the contents of the source directory.
2020-08-01 19:02:41 +09:00
MSP-Greg
bf758ef8b4 mswin build - install src zlib files 2020-08-01 19:01:45 +09:00
Nobuyoshi Nakada
e8ce9dfaf4
rb_encoding is defined as const
Duplicate type qualifier is not needed.
2020-08-01 17:58:24 +09:00
Nobuyoshi Nakada
b6e6807993
Initialize memo pointer and use it consistently to silence gcc 7+ 2020-08-01 15:04:58 +09:00
Nobuyoshi Nakada
32bec658c1
Remove obsolete rubygems file
Fixes a weird error in CodeQL autobuild.
2020-08-01 14:44:47 +09:00
git
d3d6872919 * 2020-08-01 [ci skip] 2020-08-01 11:29:53 +09:00
Burdette Lamar
eebb1de7c1
Enhanced RDoc for Array 2020-07-31 19:29:34 -07:00
David Rodríguez
f80020bc50 [rubygems/rubygems] Read path binarily
I believe this should fix a flaky test on Windows.

a516b49a0a
2020-07-31 21:07:19 +09:00
David Rodríguez
cba805536e [rubygems/rubygems] Enable Layout/LeadingEmptyLines in rubygems
9c17f220af
2020-07-31 21:07:19 +09:00
David Rodríguez
b7e88e3c2f [rubygems/rubygems] Don't format executables on gem update --system
This restores 3.0 behavior and goes back to not formatting executables
by default on `gem update --system`. This is friendlier for jruby and
doesn't really affect OS packagers.

1a504b651d
2020-07-31 21:07:19 +09:00
Hiroshi SHIBATA
0e2d8c487c [rubygems/rubygems] unset XDG_* environmental variables for testing of rubygems.
539fd9a39a
2020-07-31 21:07:19 +09:00
David Rodríguez
aa4ecfe7f7 [rubygems/rubygems] Revert "Disallow warnings to creep into the test suite"
This reverts commit 694e6afee769ffb3168a564ee7d315af2a934993.

It was failed on Windows and I'm unsure why. Also, the check seems
brittle since it could fail potentially fail because of warnings outside
of our control.

908e9344dd
2020-07-31 21:07:19 +09:00
David Rodríguez
e0bfc77824 [rubygems/rubygems] Remove unnecessary guard clause
Since 1ccf0912a161d20e0c4a7b139fd76e8739a411ba, this method no longer
uses `Kernel.gem`, so this guard clause is now unnecessary.

8a19e7401c
2020-07-31 21:07:19 +09:00
David Rodríguez
e6be06e4ef [rubygems/rubygems] Fix some intermittent test failures on truffleruby
Since they changed their default to not generate documentation on `gem
install`, we're getting some intermittent test failures. Can be
reproduced with:

```
TRUFFLERUBYOPT="--experimental-options --testing-rubygems" TESTOPTS=--name="/^\(?:TestGemGemRunner#\(?:test_list_succeeds\)\|TestGemCommandsUpdateCommand#\(?:test_handle_options_system\)\)$/ --seed=54277 --verbose" rake
```

Fix it by resetting all permanent CLI options when CLI runner loads
configuration.

7d896f4b74
2020-07-31 21:07:19 +09:00
David Rodríguez
a9b044e97b [rubygems/rubygems] Setup no longer generates formatted executables by default
Catch up with that change in `gem update --system` tests.

127ba14344
2020-07-31 21:07:19 +09:00
David Rodríguez
fe53e5a9f3 [rubygems/rubygems] Remove fileutils autoload
dca345441f
2020-07-31 21:07:19 +09:00
David Rodríguez
fedaa61b3f [rubygems/rubygems] Remove explicit require for autoloaded constant
a54230093e
2020-07-31 21:07:19 +09:00
David Rodríguez
3921ab8291 [rubygems/rubygems] Let more exceptions flow
If any error happens while verifying a package entry, it doesn't mean
that the package is corrupt. It could be a bug in rubygems, for example.
This in fact happened in CI and the current error doesn't make it easy
to troubleshoot the root cause, since it doesn't provide a backtrace.

See
https://github.com/rubygems/rubygems/pull/3807/checks?check_run_id=862526615.

So I propose to let the exception happens. There was something useful
about the previous message, which is the file entry where the error
happened, so I'm keeping that information in a warning message.

ece87d858f
2020-07-31 21:07:19 +09:00
Nobuyoshi Nakada
ebf008b9ae [rubygems/rubygems] Install plugins to user directory
Fixes the `Gem::FilePermissionError` without the privilege.
Initialize `@plugins_dir` to the user gem directory, when
installing with `--user` option.

21a71ac769
2020-07-31 21:07:19 +09:00
David Rodríguez
6c71033ac3 [rubygems/rubygems] Remove more unnecessary requires
Since `rubygems/util` is autoloaded.

52a9f88b99
2020-07-31 21:07:19 +09:00
David Rodríguez
1b2bda72fc [rubygems/rubygems] Extend the script to allow reverting the patch when tried locally
00ebf8c9f7
2020-07-31 21:07:19 +09:00
David Rodríguez
69881a41f2 [rubygems/rubygems] Add a CI test for basic rubygems functionality without openssl
The whole test suite actually passes on my system, but it has weird
errors in CI. Since I don't want to spend time on it, instead of running
the whole test suite, I'm just adding a bare test to check that `gem
list` works.

a40d9a394a
2020-07-31 21:07:19 +09:00
David Rodríguez
9057e9c7b1 [rubygems/rubygems] The file is only ever required when openssl is available
41976ef3ec
2020-07-31 21:07:19 +09:00
David Rodríguez
6eb89f8637 [rubygems/rubygems] Remove now unneeded code
We patch `net-http-persistent` to not autoload `openssl`.

757dec3cf2
2020-07-31 21:07:19 +09:00
David Rodríguez
ea8f7d4a81 [rubygems/rubygems] Gem::Specification#to_ruby doesn't need openssl
The `openssl` require when openssl not present was having the
side-effect the our custom require fallbacks would end up loading `Gem::Specification.stubs`.

Co-authored-by: Alyssa Ross <hi@alyssa.is>

22c4ded4ad
2020-07-31 21:07:19 +09:00
David Rodríguez
6608bc77b6 [rubygems/rubygems] Fix skip message
a763e539cd
2020-07-31 21:07:19 +09:00
David Rodríguez
e1494145d9 [rubygems/rubygems] Make sure tests at least load without openssl
054d57f74b
2020-07-31 21:07:19 +09:00
David Rodríguez
779f1a9c69 [rubygems/rubygems] Set the expected hash in one step
25912ce6c9
2020-07-31 21:07:19 +09:00
David Rodríguez
34527927e8 [rubygems/rubygems] Remove unnecessary check
No check is done for the other expectation and they are completely
symmetric as far as I can see.

4de89e0718
2020-07-31 21:07:19 +09:00
David Rodríguez
69fa0d6d30 [rubygems/rubygems] Move openssl require to a separate file
So it can be reused.

b9fc6e40db
2020-07-31 21:07:19 +09:00
David Rodríguez
6b14249c98 [rubygems/rubygems] In the rubies we support Exception#path is always there
babf943144
2020-07-31 21:07:19 +09:00
David Rodríguez
07dc9691a8 [rubygems/rubygems] https functionality was merged into net/https
d81ce9e457
2020-07-31 21:07:19 +09:00
David Rodríguez
0a7f12fcc6 [rubygems/rubygems] Only require what we are using
d92b94f3cf
2020-07-31 21:07:19 +09:00
David Rodríguez
9ad9c2d9c3 [rubygems/rubygems] Let the original error happen
It will give more useful information.

efcecb5af5
2020-07-31 21:07:19 +09:00