Yukihiro "Matz" Matsumoto
a3da9c1da3
AUTHORS: update entries [ci skip]
2024-02-12 00:02:35 +09:00
Yukihiro "Matz" Matsumoto
d2af9da799
Merge branch 'dearblue-doc/mruby3.3.md'
2024-02-10 17:08:57 +09:00
Yukihiro "Matz" Matsumoto
01ff7fbf0a
Update mruby3.3.md
2024-02-10 17:05:55 +09:00
Yukihiro "Matz" Matsumoto
2d2693d823
Merge branch 'doc/mruby3.3.md' of https://github.com/dearblue/mruby into dearblue-doc/mruby3.3.md
2024-02-10 16:49:56 +09:00
Yukihiro "Matz" Matsumoto
abcad36bae
string.c (memsearch_swar): fixed a buffer overflow
2024-02-09 19:09:01 +09:00
Yukihiro "Matz" Matsumoto
868aeaf48c
string.c (memsearch_swar): fixed a buffer overflow
2024-02-09 18:52:44 +09:00
Yukihiro "Matz" Matsumoto
874f1e0138
backtrace.c (copy_location): rename some function and arguments
2024-02-08 23:41:22 +09:00
Yukihiro "Matz" Matsumoto
432caf0670
backtrace.c (pack_backtrace): refactor the function that called once
2024-02-08 23:22:48 +09:00
Yukihiro "Matz" Matsumoto
60919807e5
backtrace.c (each_backtrace): make return type to size_t
2024-02-07 17:34:33 +09:00
Yukihiro "Matz" Matsumoto
0a11215452
backtrace.c (packed_backtrace): avoid calling each_backtrace() twice
...
Since the length of the backtrace is at most `ciidx + 1` we can avoid
the first call of each_backtrace().
2024-02-07 17:32:58 +09:00
Yukihiro "Matz" Matsumoto
b67cea4442
backtrace.c (pack_backtrace_i): avoid infinite loop; ref #6161
...
When irep->refcnt reaches UINT16_MAX, mrb_irep_incref() raises
exception but the function pack_backtrace_i() is called from
mrb_exc_raise() thus causes the infinite loop problem. So this is a
hack-ish workaround by making irep reference to NULL if refcnt reaches
the maximum count. Probably we will address this issue again to make it
better.
2024-02-07 17:30:11 +09:00
Yukihiro "Matz" Matsumoto
b8e4c4b6ba
Merge pull request #6166 from dearblue/mrb_heap_page
...
Stop pseudo flexible array in `mrb_heap_page`
2024-02-05 21:45:04 +09:00
Yukihiro "Matz" Matsumoto
32fb0c04ee
Merge pull request #6165 from dearblue/RVALUE
...
Reduce `RVALUE` related pointer casts.
2024-02-05 21:42:51 +09:00
Yukihiro "Matz" Matsumoto
5f699e797d
Merge pull request #6167 from dearblue/obj_free
...
Change the `end` parameter of `obj_free()` to a boolean type
2024-02-05 21:42:41 +09:00
Yukihiro "Matz" Matsumoto
0fe95d6c81
mruby-pack (mrb_pack_pack): avoid integer overflow
...
`int` (32bit integer) may be too small on 64bit platforms.
2024-02-05 21:28:11 +09:00
dearblue
8f14785f10
Stop pseudo flexible array in mrb_heap_page
...
For reference, the flexible array was introduced by commit 3ab2f9371e (#2997 ).
Subsequently changed for compatibility with C++ by commit 24939723d7 (#5596 ).
2024-02-04 21:55:54 +09:00
dearblue
84fbe63457
Change the end parameter of obj_free() to a boolean type
...
The caller is a boolean value from the first.
2024-02-04 21:55:54 +09:00
dearblue
dde5fe3a60
Reduce RVALUE related pointer casts.
2024-02-04 21:55:53 +09:00
Yukihiro "Matz" Matsumoto
f04a729dc9
gc.c (obj_free): check if irep is NULL before mrb_irep_decref(); #6161
2024-02-04 17:06:05 +09:00
Yukihiro "Matz" Matsumoto
2f63b49542
backtrace.c: use mrb_irep references instead of struct RProc
...
To reduce GC burden (no mark needed). We use `mrb_irep_incref()` and
`mrb_irep_decref()` instead to track irep memory usage; ref #6161
2024-02-04 16:48:42 +09:00
Yukihiro "Matz" Matsumoto
4dfadb4f9f
Merge pull request #6159 from dearblue/debug/irep-free
...
Allow to detect use-after-free after `mrb_irep_free()` for debugging
2024-02-04 16:26:03 +09:00
Yukihiro "Matz" Matsumoto
0abc36f761
Merge pull request #6161 from dearblue/backtrace
...
Fixed use-after-free by backtrace object
2024-02-03 23:39:58 +09:00
Yukihiro "Matz" Matsumoto
9524d8e199
Merge pull request #6164 from jbampton/remove-ERROR_ON_MISSING_EXEC_BIT
...
super-linter: remove `ERROR_ON_MISSING_EXEC_BIT` check
2024-02-03 00:25:35 +09:00
John Bampton
8e04e76325
super-linter: remove ERROR_ON_MISSING_EXEC_BIT check
...
https://github.com/super-linter/super-linter/releases/tag/v6.0.0
https://github.com/super-linter/super-linter/pull/5120
2024-02-02 15:51:18 +10:00
Yukihiro "Matz" Matsumoto
08c422c7ee
numeric.c (cmpnum): support fixnum cmp bignum; fix #6163
2024-02-02 14:18:57 +09:00
Yukihiro "Matz" Matsumoto
4762689f93
Merge pull request #6153 from dearblue/gem-list
...
Make `MRuby::Gems::List#{each,<<}` method return `self`
2024-02-02 08:19:44 +09:00
Yukihiro "Matz" Matsumoto
fd04ffc2f6
Merge pull request #6144 from jbampton/add-hook-detect-aws-credentials
...
pre-commit: add hook `detect-aws-credentials`
2024-02-02 08:15:38 +09:00
Yukihiro "Matz" Matsumoto
6e09555749
Merge pull request #6150 from dearblue/itself
...
Introduce `mrb_obj_itself()`
2024-02-01 16:15:42 +09:00
Yukihiro "Matz" Matsumoto
24aad706e1
Merge pull request #6162 from mruby/dependabot/github_actions/super-linter/super-linter-6.0.0
...
build(deps): bump super-linter/super-linter from 5.7.2 to 6.0.0
2024-02-01 16:02:45 +09:00
dependabot[bot]
a0bcf63bd5
build(deps): bump super-linter/super-linter from 5.7.2 to 6.0.0
...
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter ) from 5.7.2 to 6.0.0.
- [Release notes](https://github.com/super-linter/super-linter/releases )
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/super-linter/super-linter/compare/v5.7.2...v6.0.0 )
---
updated-dependencies:
- dependency-name: super-linter/super-linter
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-31 14:23:26 +00:00
dearblue
9543cfa7ee
Fixed use-after-free by backtrace object
...
The `MRB_TT_BACKTRACE` object has been added for the purpose.
Previously, "use-after-free" could occur because the reference count in `backtrace_location::irep` was not incremented.
fixed #6160
2024-01-31 22:17:16 +09:00
Yukihiro "Matz" Matsumoto
cac698fe88
string.c (memsearch_swar): changed the function name
...
For your information, SWAR stands for SIMD within a register.
2024-01-31 21:37:39 +09:00
Yukihiro "Matz" Matsumoto
f8527f0670
string.c (mrb_memsearch_ss): update a comment regarding alignment issue
2024-01-31 21:36:05 +09:00
Yukihiro "Matz" Matsumoto
d8144aef78
string.c: remove a comment regarding unsigned char*
2024-01-31 21:34:54 +09:00
Yukihiro "Matz" Matsumoto
363f795432
string.c: remove unnecessary type casts
...
We don't need `unsigned` for string pointers.
2024-01-31 15:06:04 +09:00
Yukihiro "Matz" Matsumoto
e61a2881a7
string.c (mrb_memsearch_ss): fix potential buffer overflow; fix #6158
...
- stop using `bigint*`
- stop integer pointer dereferences
- use `memcpy` to integer variables
- add reminder search for shorter patterns
2024-01-31 07:48:24 +09:00
Yukihiro "Matz" Matsumoto
219cfd63e1
string.c (mrb_memsearch_ss): update integer prefixes (LLU -> ULL)
2024-01-31 07:42:52 +09:00
Yukihiro "Matz" Matsumoto
6ba65ea0f0
string.c (mrb_memsearch_ss): update comment
2024-01-31 01:54:37 +09:00
Yukihiro "Matz" Matsumoto
44a5882bc2
string.c (mrb_memsearch_ss): remove useless alignment adjustment
...
Ref #6158
2024-01-31 01:27:10 +09:00
Yukihiro "Matz" Matsumoto
be5448fd16
string.c (mrb_memsearch): refactor m==1 (use memchr) case
2024-01-31 01:17:12 +09:00
Yukihiro "Matz" Matsumoto
d8e1aed646
string.c (search_nonascii): need not to check n>3 on 32bit platforms
2024-01-30 12:35:56 +09:00
dearblue
60dd6b5586
Allow to detect use-after-free after mrb_irep_free() for debugging
...
Write invalid value to `irep` if `MRB_DEBUG` is defined by `MRuby::Build#enable_debug`.
2024-01-29 21:32:04 +09:00
Yukihiro "Matz" Matsumoto
0e1125c3af
Merge pull request #6152 from dearblue/io-error
...
Retrieving the IO exception class with presym
2024-01-27 15:10:29 +09:00
Yukihiro "Matz" Matsumoto
fefebf7a77
Merge pull request #6151 from dearblue/eval-init
...
Refer to `mrb->module_class` directly in `mrb_mruby_eval_gem_init()`
2024-01-27 15:09:30 +09:00
Yukihiro "Matz" Matsumoto
e859b430cc
fixup! string.c (search_nonascii): add faster search using SSE2
2024-01-27 11:59:29 +09:00
Yukihiro "Matz" Matsumoto
dee1ded7b5
string.c (mrb_memsearch_ss): support bigendians
2024-01-27 06:23:16 +09:00
Yukihiro "Matz" Matsumoto
06d9a54760
string.c (mrb_memsearch): remove simple search and quick search
...
Since mrb_memsearch_ss() is fast enough for most of the cases, we try to
simplify the code.
2024-01-27 06:22:55 +09:00
Yukihiro "Matz" Matsumoto
2943ca2685
string.c (mrb_memsearch_ss): faster integer-wise substring search
...
The function is based on @WojciechMula's code from the repository
https://github.com/WojciechMula/sse4-strstr.git Since it's licensed
under 2 clause BSD, we updated LEGAL file too.
2024-01-27 06:16:33 +09:00
Yukihiro "Matz" Matsumoto
08cd281200
string.c (search_nonascii): skip alignment adjustment for some CPUs
...
Some CPUs (e.g. x86) allow unaligned access to the memory.
2024-01-26 08:22:33 +09:00
Yukihiro "Matz" Matsumoto
68ab95ea57
string.c (mrb_memsearch): take char* instead of void*
...
Avoid useless `void*`.
2024-01-25 22:32:31 +09:00