summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-23[ruby/fiddle] Improve documentation on how to correctly free memory and free ↵Chris Seaton
memory in tests (#33) https://github.com/ruby/fiddle/commit/e59cfd708a
2020-05-23[ruby/fiddle] Export Fiddle::VERSIONSutou Kouhei
https://github.com/ruby/fiddle/commit/1b93a2d9db Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Update file listSutou Kouhei
https://github.com/ruby/fiddle/commit/b04cb92d7b Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Fix a typoSutou Kouhei
https://github.com/ruby/fiddle/commit/445ca6b501 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Bump versionSutou Kouhei
https://github.com/ruby/fiddle/commit/f8fb7c4823 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Add Fiddle::VERSIONSutou Kouhei
https://github.com/ruby/fiddle/commit/9dcf64c096 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Add missing spec.extensionsSutou Kouhei
https://github.com/ruby/fiddle/commit/2ce36b1fdc Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Fix assignment to array within struct (#26)sinisterchipmunk
* Allow access to a struct's underlying memory with `struct[offset, length]`. https://github.com/ruby/fiddle/commit/24083690a6 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Make array access override compatible with base class (#25)sinisterchipmunk
* Allow access to a struct's underlying memory with `struct[offset, length]`. * Make accessing a struct's underlying memory more convenient. * refactor memory access unit tests for improved clarity https://github.com/ruby/fiddle/commit/c082c81bb5 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Initialize memory to 0 when calling Fiddle.malloc(). (#24)sinisterchipmunk
https://github.com/ruby/fiddle/commit/8414239ca3 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-22Fix origin iclass pointer for modulesJeremy Evans
If a module has an origin, and that module is included in another module or class, previously the iclass created for the module had an origin pointer to the module's origin instead of the iclass's origin. Setting the origin pointer correctly requires using a stack, since the origin iclass is not created until after the iclass itself. Use a hidden ruby array to implement that stack. Correctly assigning the origin pointers in the iclass caused a use-after-free in GC. If a module with an origin is included in a class, the iclass shares a method table with the module and the iclass origin shares a method table with module origin. Mark iclass origin with a flag that notes that even though the iclass is an origin, it shares a method table, so the method table should not be garbage collected. The shared method table will be garbage collected when the module origin is garbage collected. I've tested that this does not introduce a memory leak. This change caused a VM assertion failure, which was traced to callable method entries using the incorrect defined_class. Update rb_vm_check_redefinition_opt_method and find_defined_class_by_owner to treat iclass origins different than class origins to avoid this issue. This also includes a fix for Module#included_modules to skip iclasses with origins. Fixes [Bug #16736] Notes: Merged: https://github.com/ruby/ruby/pull/3136
2020-05-23Time.xmlschema: Clarify error and docsHenrik Nyh and Tomas Skogberg
It parses a (date)time, not a date. Notes: Merged: https://github.com/ruby/ruby/pull/3046
2020-05-23Enhanced Rdoc for HashBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/3134
2020-05-23Remove a bunch of files that were deleted upstreamDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3132
2020-05-23* 2020-05-23 [ci skip]git
2020-05-23Fixed wrong usage rm_rf for cleanup the default gems in sync toolHiroshi SHIBATA
2020-05-22Revert "Fix origin iclass pointer for modules"Jeremy Evans
This reverts commit c745a60634260ba2080d35af6fdeaaae86fe5193. This triggers a VM assertion. Reverting until the issue can be debugged.
2020-05-22Fix origin iclass pointer for modulesJeremy Evans
If a module has an origin, and that module is included in another module or class, previously the iclass created for the module had an origin pointer to the module's origin instead of the iclass's origin. Setting the origin pointer correctly requires using a stack, since the origin iclass is not created until after the iclass itself. Use a hidden ruby array to implement that stack. Correctly assigning the origin pointers in the iclass caused a use-after-free in GC. If a module with an origin is included in a class, the iclass shares a method table with the module and the iclass origin shares a method table with module origin. Mark iclass origin with a flag that notes that even though the iclass is an origin, it shares a method table, so the method table should not be garbage collected. The shared method table will be garbage collected when the module origin is garbage collected. I've tested that this does not introduce a memory leak. This also includes a fix for Module#included_modules to skip iclasses with origins. Fixes [Bug #16736] Notes: Merged: https://github.com/ruby/ruby/pull/2978
2020-05-22Revert a commit miss in "Fixed potential memory leak"Nobuyoshi Nakada
This reverts an unintentional change in commit 79d9528ddca1dfe2dd99287dc88fd7c2b30f7137.
2020-05-22Fixup 1d079a0c5d4d80860a4d6d692344124fe5c562b5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Sync Bundler PR #3624 with HEAD commitsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Revert 1f011cccb16ca9e8ee378cb5a9d4c14459afd68cHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Marked the failing examples with the current master branch on ruby repositoryHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Glob the all man files provided by bundler upstreamHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Sync Bundler PR #3624Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Suppress warnings no inline ruby debug (#3107)Kenta Murata
* Suppress unused warnings occurred due to -fno-inline * Suppress warning occurred due to RUBY_DEBUG=1 Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-05-22Enhanced rdoc for Hash (#3129)Burdette Lamar
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2020-05-22add static modifier for rb_hash_keep_if funcS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/3130
2020-05-22add static modifier for rb_hash_select_bang funcS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/3130
2020-05-22add static modifier for rb_hash_select funcS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/3130
2020-05-22fix memory leak of ccsKoichi Sasada
rb_callable_method_entry() creates ccs entry in cc_tbl, but this code overwrite by insert newly created ccs and overwrote ccs never freed. [Bug #16900] Notes: Merged: https://github.com/ruby/ruby/pull/3128
2020-05-22Run major GC three times to make sure the minor GC reasonYusuke Endoh
Same as 02705b27be207fce57bd0253251f81108c7ed57b http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/2955433 ``` 1) TestGc#test_start_full_mark [/tmp/ruby/v3/src/trunk-random1/test/ruby/test_gc.rb:61]: Expected :oldmalloc to be nil. ```
2020-05-22Fixed potential memory leakNobuyoshi Nakada
Create a wrapper object first, then buffer allocation which can fail.
2020-05-22* 2020-05-22 [ci skip]git
2020-05-21Unpin and update VM referencesAaron Patterson
This commit just unpins and updates VM references
2020-05-21Synchronized non-inline version rb_scan_args with the inline versionNobuyoshi Nakada
2020-05-21Added UNREACHABLE_RETURNNobuyoshi Nakada
To get rid of a void function at the end of non-void function.
2020-05-21test/ruby/test_optimization.rb: Proc creation test should count :T_DATAYusuke Endoh
instead of :TOTAL of ObjectSpace.count_objects. This test had failed very occasionally: https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200521T033004Z.fail.html.gz ``` 1) Failure: TestRubyOptimization#test_block_parameter_should_not_create_objects [/home/chkbuild/chkbuild/tmp/build/20200521T033004Z/ruby/test/ruby/test_optimization.rb:713]: <0> expected but was <407>. ``` This test of lazy proc creation checks if no object is created during a method call. However, calling a method itself increases the count of objects because method cache is now an object (T_MEMO). The reason why this test rarely fails is because the test was buggy; it checked the count of :TOTAL, but :TOTAL count changes only when the GC heap is expanded. Creating one object rarely causes heap expansion. The test must have checked not only :TOTAL but also the count of :FREE. Instead, this change more directly checks :T_DATA. Note that a Proc object is T_DATA.
2020-05-21Fixed a variable name [Bug #16903]Nobuyoshi Nakada
Fix up of 0e3b0fcdba7 From: fd0 (Daisuke Fujimura)
2020-05-21rb_scan_args_set: make it slightly readable卜部昌平
This is a pure refactoring that improves understanding of what is going on. Not a big win though.
2020-05-21[ci skip] Enhanced rdoc for Hash (#3121)Burdette Lamar
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2020-05-20Only marked objects should be considered movableAaron Patterson
Ruby's GC is incremental, meaning that during the mark phase (and also the sweep phase) programs are allowed to run. This means that programs can allocate objects before the mark or sweep phase have actually completed. Those objects may not have had a chance to be marked, so we can't know if they are movable or not. Something that references the newly created object might have called the pinning function during the mark phase, but since the mark phase hasn't run we can't know if there is a "pinning" relationship. To be conservative, we must only allow objects that are not pinned but also marked to move.
2020-05-21* 2020-05-21 [ci skip]git
2020-05-20Use a pinning list for keeping objects alive during assembly.Aaron Patterson
The GC will not disassemble incomplete instruction sequences. So it is important that when instructions are being assembled, any objects the instructions point at should not be moved. This patch implements a fixed width array that pins its references. When the instructions are done being assembled, the pinning array goes away and the objects inside the iseqs are allowed to move.
2020-05-20add static modifer for rb_hash_fetch_values funcS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/3125
2020-05-20pure_parser.rb: get rid of an error at localed messagesNobuyoshi Nakada
2020-05-20Use __bultin_assume() from clang-7Koichi Sasada
We observed combination of multiple __builtin_assume() can cause strange compile results on clang-6 (-DNDEBUG exposed this issue). To avoid this problem, __builtin_assume() is from clang-7. https://github.com/ruby/ruby/pull/3120#issuecomment-630821333 Notes: Merged: https://github.com/ruby/ruby/pull/3122
2020-05-20* 2020-05-20 [ci skip]git
2020-05-19Include wchar.h before wrapping memchrNobuyoshi Nakada
On mingw, wmemcpy() is defined as an inline function using memcpy(), and the static inline wrapper causes a warning. ``` In file included from include/ruby/ruby.h:39, from win32/file.c:5: include/ruby/internal/memory.h:284:16: warning: 'ruby_nonempty_memcpy' is static but used in inline function 'wmemcpy' which is not static 284 | #define memcpy ruby_nonempty_memcpy | ^~~~~~~~~~~~~~~~~~~~ ```
2020-05-19Ignore exceptions when closing data connections [Bug #16780]Shugo Maeda
Patch by koshigoe (Masataka SUZUKI). Thanks!