[pull] master from mruby:master#173
Merged
pull[bot] merged 14 commits intosysfce2:masterfrom Jan 8, 2026
Merged
Conversation
Compilation of mirb with Cosmopolitan fails because of missing include (Cosmopolitan seems to be more strict than "traditional" compilers.
The local flock() function for Windows is now dead code since the HAL refactoring. The Windows implementation is in hal-win-io which provides mrb_hal_io_flock(). Fixes warning: 'flock' defined but not used [-Wunused-function] Co-authored-by: Claude <noreply@anthropic.com>
When year value is close to MRB_INT_MIN, subtracting TM_YEAR_BASE (1900) causes signed integer overflow. Add underflow check before the subtraction. Co-authored-by: Claude <noreply@anthropic.com>
Shifting 1 left by MRB_INT_BIT-1 (e.g., 63 on 64-bit) bits into the sign bit is undefined behavior. Change the overflow check from >= MRB_INT_BIT to >= MRB_INT_BIT-1 to prevent this. Co-authored-by: Claude <noreply@anthropic.com>
prevent resource exhaustion when computing power with extremely large exponents (e.g., 81.pow(51742871469327219)). the check estimates the result size and raises RangeError if it would exceed 1 million bits. Co-authored-by: Claude <noreply@anthropic.com>
Enforces security best practices by requiring a minimum age for new dependency releases before they are automatically updated by Dependabot. This practice, known as a "cooldown period," helps mitigate supply chain attacks by allowing time for frequently published malicious packages to be identified. https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#cooldown-
when a Set contains itself (directly or indirectly), computing its hash would cause infinite recursion leading to SystemStackError. the exception during khash rebuild leaked memory. add recursion detection flag to Set#hash that returns 0 for recursive references, similar to Ruby's behavior. Co-authored-by: Claude <noreply@anthropic.com>
rename mrb_alloca() to mrb_temp_alloc() for clearer naming - the new name better describes its purpose as GC-managed temporary allocation. keep mrb_alloca() as a macro alias for backward compatibility. apply mrb_temp_alloc() to fix potential memory leaks in: - mruby-strftime: if mrb_str_cat() raises, allocated buffers now cleaned by GC - mruby-io File.readlink: if mrb_str_new() raises, buffer now cleaned by GC Co-authored-by: Claude <noreply@anthropic.com>
When defining a method with a required keyword argument without
parentheses, mruby incorrectly parsed the next line as the default
value:
def foo arg:
123
end
Was parsed as: def foo(arg: 123); end (optional kwarg, empty body)
Should be: def foo(arg:); 123; end (required kwarg, body returns 123)
The fix sets EXPR_ARG lexer state after parsing f_label, making
newlines significant. This prevents the parser from consuming
expressions across line boundaries as default values for keyword
arguments.
Also fixes a pre-existing bug in f_label where tNUMPARAM (type <num>)
was implicitly assigned to $$ (type <id>) without conversion. Now
explicitly uses intern_numparam() to convert numbered parameters to
symbols.
Fixes #6268
when converting a shared/static string (IREP_TT_SSTR) to heap-allocated (IREP_TT_STR), copy the original content to the new buffer. previously, the original content was lost when allocating new memory, leaving the first bytes uninitialized. this caused find_pool_str() to read uninitialized memory via memcmp() when searching for duplicate strings. reported by OSS-Fuzz. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )