Commit Graph

17916 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto d8496fc9be mruby-bin-debugger: combine variable declaration with initialization 2025-11-08 14:30:13 +09:00
Yukihiro "Matz" Matsumoto e66c4d53aa mruby-bin-mirb: combine variable declaration with initialization 2025-11-08 14:29:34 +09:00
Yukihiro "Matz" Matsumoto 30c0ef6968 mruby-bin-mrbc: combine variable declaration with initialization 2025-11-08 14:29:06 +09:00
Yukihiro "Matz" Matsumoto 0485ecdb01 mruby-array-ext: combine variable declaration with initialization 2025-11-08 14:28:22 +09:00
Yukihiro "Matz" Matsumoto 00905566ac mruby-dir: combine variable declaration with initialization 2025-11-08 14:27:44 +09:00
Yukihiro "Matz" Matsumoto 4f33c0cc11 mruby-error: combine variable declaration with initialization 2025-11-08 14:26:49 +09:00
Yukihiro "Matz" Matsumoto 688380bec2 mruby-kernel-ext: combine variable declaration with initialization 2025-11-08 14:25:22 +09:00
Yukihiro "Matz" Matsumoto 75a2a59637 mruby-proc-binding: combine variable declaration with initialization 2025-11-08 14:24:40 +09:00
Yukihiro "Matz" Matsumoto e58c838c1d mruby-sprintf: combine variable declaration with initialization 2025-11-08 14:24:12 +09:00
Yukihiro "Matz" Matsumoto 6bcd433214 mruby-string-ext: combine variable declaration with initialization 2025-11-08 14:23:41 +09:00
Yukihiro "Matz" Matsumoto 7e2f20573c mruby-task: combine variable declaration with initialization 2025-11-08 14:14:44 +09:00
Yukihiro "Matz" Matsumoto a9ed9190d3 class.c: combine variable declaration with initialization 2025-11-08 14:09:16 +09:00
Yukihiro "Matz" Matsumoto b99233bc45 etc.c: combine variable declaration with initialization 2025-11-08 14:08:23 +09:00
Yukihiro "Matz" Matsumoto b592d02d63 gc.c: combine variable declaration with initialization 2025-11-08 14:07:41 +09:00
Yukihiro "Matz" Matsumoto 33ec660cff kernel.c: combine variable declaration with initialization 2025-11-08 14:07:00 +09:00
Yukihiro "Matz" Matsumoto 9f91d5d1a2 load.c: combine variable declaration with initialization 2025-11-08 14:06:11 +09:00
Yukihiro "Matz" Matsumoto 717ac087ff object.c: combine variable declaration with initialization 2025-11-08 14:05:27 +09:00
Yukihiro "Matz" Matsumoto ed82cea4ca proc.c: combine variable declaration with initialization 2025-11-08 14:04:39 +09:00
Yukihiro "Matz" Matsumoto fa8c460c61 range.c: combine variable declaration with initialization 2025-11-08 14:04:11 +09:00
Yukihiro "Matz" Matsumoto 098812d10c string.c: combine variable declaration with initialization 2025-11-08 13:58:43 +09:00
Yukihiro "Matz" Matsumoto 1d3393caf5 variable.c: combine variable declaration with initialization 2025-11-08 13:57:32 +09:00
Yukihiro "Matz" Matsumoto 240412a290 Merge pull request #6665 from dearblue/set.join 2025-11-05 15:57:49 +09:00
dearblue 0e653eb4c2 Fixed use-after-free with Set#join
The `mrb_obj_as_string()` function can call the `#to_s` method.
String addresses and string lengths obtained outside the `KSET_FOREACH()` loop may become invalid.
2025-11-04 22:09:08 +09:00
Yukihiro "Matz" Matsumoto b18a99c6f7 Merge pull request #6661 from mruby/dependabot/bundler/rake-13.3.1 2025-10-30 17:50:20 +09:00
Yukihiro "Matz" Matsumoto 575767b0f8 Merge pull request #6631 from dearblue/build/unparallel 2025-10-30 17:21:39 +09:00
dependabot[bot] 29dd02e387 build(deps): bump rake from 13.3.0 to 13.3.1
Bumps [rake](https://github.com/ruby/rake) from 13.3.0 to 13.3.1.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v13.3.0...v13.3.1)

---
updated-dependencies:
- dependency-name: rake
  dependency-version: 13.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-29 14:10:44 +00:00
Yukihiro "Matz" Matsumoto 2c47e84cab Merge pull request #6656 from dearblue/combination_init.2 2025-10-29 11:01:29 +09:00
Yukihiro "Matz" Matsumoto cbab9ca613 Merge pull request #6658 from mruby/dependabot/github_actions/actions/upload-artifact-5 2025-10-28 09:48:06 +09:00
Yukihiro "Matz" Matsumoto e682b20f1d mruby-compiler: restore exception handling for ||= on class variables; fix #6657
Restore exception handling for `||=` operator on class variables and constants
that was inadvertently removed in commit 0ca48e24f. When reading an undefined
class variable with GETCV opcode raises NameError, the exception handler
catches it and loads false, allowing the assignment to proceed.

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-28 09:46:51 +09:00
dependabot[bot] 2a59e639b1 build(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 14:50:04 +00:00
Yukihiro "Matz" Matsumoto eb398971bf array.c: fix use-after-realloc in Array#sort!; fix #6649
add length check to detect array modification during sort. when realloc()
shrinks an array in-place, it may return the same pointer, defeating the
pointer-only check. the new check catches both pointer changes and length
changes, preventing out-of-bounds access.

the fix captures array pointer and length at the start of each comparison,
then validates both after user code executes. this detects modifications
even when realloc() returns the original pointer.

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 15:06:14 +09:00
Yukihiro "Matz" Matsumoto ec58dca22f mruby-array-ext: use Data_Make_Struct() in ary_combination_init
refactor to use the standard Data_Make_Struct() macro instead of manual
RData allocation and linking. the macro provides automatic zero-initialization
and is more idiomatic.

ref #6655

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 11:46:22 +09:00
Yukihiro "Matz" Matsumoto 16efbd5c91 Merge pull request #6655 from dearblue/combination_init 2025-10-27 11:43:26 +09:00
Yukihiro "Matz" Matsumoto ad51bf848b mrbgem.rake: simplify hal selection logic
remove redundant visualcpp and mingw checks since for_windows? already
detects all windows builds including visual c++ and mingw.

ref #6653

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 11:11:27 +09:00
Yukihiro "Matz" Matsumoto 28b567ae78 Merge pull request #6653 from dearblue/mingw
Improve HAL-related components for MinGW
2025-10-27 10:56:28 +09:00
Yukihiro "Matz" Matsumoto f1e2ab03fb ci: remove interactive claude workflow
removed due to same OIDC authentication failures as claude-code-review.
workflow can be re-added when the action is more stable.

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 09:01:43 +09:00
Yukihiro "Matz" Matsumoto 4220ab449c ci: remove claude code review workflow
removed due to persistent OIDC authentication failures in the beta action.
workflow can be re-added when the action is more stable.

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 08:58:42 +09:00
Yukihiro "Matz" Matsumoto 88bfa0bec1 mruby-bigint: move pool handling from bint_set to mpz_move
refactored the stack-use-after-return fix to encapsulate pool memory
handling in mpz_move instead of bint_set, providing cleaner code and
automatic protection for all 22 callers of mpz_move; ref #6651

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 08:48:04 +09:00
Yukihiro "Matz" Matsumoto 6e89c433a8 Merge pull request #6651 from meder/meder-patch-2 2025-10-27 08:43:17 +09:00
Yukihiro "Matz" Matsumoto 40606418a9 mruby-array-ext: combine variable declaration with initialization 2025-10-27 08:38:17 +09:00
Yukihiro "Matz" Matsumoto 8455c41a74 mruby-compiler: combine variable declaration with initialization 2025-10-27 08:24:07 +09:00
Yukihiro "Matz" Matsumoto b6eb21cac0 mruby-errno: combine variable declaration with initialization 2025-10-27 07:59:20 +09:00
Yukihiro "Matz" Matsumoto 3872587ec2 mruby-eval: combine variable declaration with initialization 2025-10-27 07:45:40 +09:00
Yukihiro "Matz" Matsumoto 5a147838ba mruby-hash-ext: combine variable declaration with initialization 2025-10-26 23:52:20 +09:00
Yukihiro "Matz" Matsumoto e636360250 mruby-io: combine variable declaration with initialization 2025-10-26 23:48:38 +09:00
Yukihiro "Matz" Matsumoto d81d343f5b mruby-math: combine variable declaration with initialization 2025-10-26 23:30:14 +09:00
Yukihiro "Matz" Matsumoto 4eddd18ebb mruby-pack: combine variable declaration with initialization 2025-10-26 23:03:47 +09:00
dearblue c28223ac5b Fix integer overflow in allocation size calculation
Passing a large integer value as the first argument to `Array#ary_combination_init` could cause an incorrect memory allocation due to integer overflow.
This would result in an invalid write during the subsequent zero-fill of the memory.

To resolve the issue, it has been replaced with `mrb_calloc()`.
However, since the current `mrb_calloc()` returns `NULL` due to overflow, it has been modified to raise an exception as a clear error.
2025-10-26 21:02:20 +09:00
dearblue 2512b4b399 Preventing Memory Leaks in Array#__combination_init
If memory allocated with `mrb_malloc()` is not associated with an object, subsequent attempts to allocate memory or objects will fail and raise an exception, resulting in a memory leak.
2025-10-26 20:49:25 +09:00
Yukihiro "Matz" Matsumoto 87f406581b mruby-proc-ext: combine variable declaration with initialization 2025-10-26 20:33:06 +09:00