summaryrefslogtreecommitdiff
path: root/tool/lib/leakchecker.rb
AgeCommit message (Collapse)Author
2020-07-15Check warning flags only if available to run with old versionsNobuyoshi Nakada
2020-05-27test/drb/test_drbssl.rb: skip LeakChecker as openssl keeps /dev/randomYusuke Endoh
and /dev/urandom intentionally. OpenSSL::PKey::RSA.new opens the two random generators and keeps the file descriptors. https://github.com/openssl/openssl/blob/93f99b681ab5a1cf7062053323e09b0cad5ff854/crypto/rand/rand_unix.c#L674 They are detected by the LeakChecker as fd leak, but it is intentional. http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20200526T160005Z.log.html.gz ``` [ 597/20199] DRbTests::TestDRbSSLAry#test_01 = 0.29 s Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 8 #<File::Stat dev=0x6, ino=11, mode=020666, nlink=1, uid=0, gid=0, rdev=0x109, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.751999995 +0000, mtime=2020-05-23 14:45:13.751999995 +0000, ctime=2020-05-23 14:45:13.751999995 +0000> Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 9 #<File::Stat dev=0x6, ino=10, mode=020666, nlink=1, uid=0, gid=0, rdev=0x108, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.755999995 +0000, mtime=2020-05-23 14:45:13.755999995 +0000, ctime=2020-05-23 14:45:13.755999995 +0000> ```
2020-05-16leakchecker.rb: show test nameNobuyoshi Nakada
When multiple autoclose IO objects are leaked too.
2020-05-08Check encodings of STDIN,STDOUT,STDERR tooKazuhiro NISHIYAMA
2020-05-07leakchecker.rb: try `lsof`Nobuyoshi Nakada
2020-05-06Makes nil-safeNobuyoshi Nakada
2020-05-06Ignore FDs kept by system libraryNobuyoshi Nakada
`getaddrinfo` on macOS seems keeping FDs to query host names internally.
2020-05-06leakchecker.rb: search /dev/fd tooNobuyoshi Nakada
It is more popular than /proc/self/fd.
2020-03-04Narrow the check target.Koichi Sasada
Call GC.verify_internal_consistency only for Gem related test on i386-solaris.
2020-03-03Limit the debug code conditon so that it runs only under i386-solarisYusuke Endoh
2020-03-03add debug code for SolarisKoichi Sasada
Check heap consistency after each test to debug. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20200303T012406Z.fail.html.gz
2019-12-27Add check_warning_flags to leakcheckerKazuhiro NISHIYAMA
2019-11-18Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans
This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-12tool/lib/leakchecker.rb: show the code location that allocated leaked fdYusuke Endoh
by using ObjectSpace.trace_object_allocations. `make test-all LEAK_CHECKER_TRACE_OBJECT_ALLOCATION=true` will print not only leaked fds but also where it was created.
2019-09-30Revert "introduce debug check."Koichi Sasada
This reverts commit c3b84f2de83a27acc638f99743bfa2c44bac621c. Backtrace shows it is before running tests and debug check was nonsense.
2019-09-30introduce debug check.Koichi Sasada
There are random failures: > lib/rubygems/core_ext/kernel_require.rb:61:in `require': > wrong number of arguments (given 1, expected 0) (ArgumentError) http://ci.rvm.jp/results/trunk-jemalloc@silicon-docker/2275159 To check this failure, I added a small check code.
2019-07-02Move to tool/lib from test/lib.Hiroshi SHIBATA