| Age | Commit message (Collapse) | Author |
|
|
|
This is a correction based on the review by @matz.
https://github.com/mruby/mruby/pull/5306#pullrequestreview-578378401
|
|
Previously, problems occurred when the `fixnum` was exceeded.
- 32-bit cpu mode with `MRB_WORD_BOXING` and `MRB_INT32`:
```console
% bin/mruby -e 'p [0x7fffffff].pack("N").unpack("N")'
trace (most recent call last):
-e:1: cannot unpack to Integer: 2147483647 (RangeError)
```
- 64-bit cpu mode with `MRB_WORD_BOXING` and `MRB_INT64`:
```console
% bin/mruby -e 'p [0x7fffffff_ffffffff].pack("q").unpack("q")'
trace (most recent call last):
-e:1: cannot unpack to Integer: 9223372036854775807 (RangeError)
```
|
|
| Previous Name | New Name |
|------------------------------|-------------------------|
| MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS |
| MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS |
| MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI |
| MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION |
| MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK |
| MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING |
| MRB_DISABLE_STDIO | MRB_NO_STDIO |
| ENABLE_LINENOISE | MRB_USE_LINENOISE |
| ENABLE_READLINE | MRB_USE_READLINE |
| DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE |
| DISABLE_GEMS | MRB_NO_GEMS |
* `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed.
* `MRB_` prefix is added to those without.
* The previous names can also be used for compatibility.
|
|
From human readable (ASCII) string representation to binary dump of
IEEE754 in little endian.
|
|
- Integrate `Fixnum` and `Integer`
- Remove `Integral`
- `int / int -> int`
- Replace `mrb_fixnum()` to `mrb_int()`
- Replace `mrb_fixnum_value()` to `mrb_int_value()`.
- Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
|
|
* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
If necessary, use `struct mrb_state::integer_class` instead.
|
|
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT`
- `MRB_USE_FLOAT` => `MRB_USE_FLOAT32`
The former is to use `USE_XXX` naming convention. The latter is to make
sure `float` is 32bit float and not floating point number in general.
|
|
|
|
|
|
|
|
|
|
ref #4576 and ref #4947
* Need MRBAPI functions without `MRB_DISABLE_STDIO`:
* mrbgems/mruby-bin-debugger
* mrbgems/mruby-bin-mirb
* mrbgems/mruby-bin-mrbc
* mrbgems/mruby-bin-mruby
* mrbgems/mruby-bin-strip
* Need `stdio.h`:
* mrbgems/mruby-io
* mrbgems/mruby-print
* Need `snprintf()` in `stdio.h`:
* mrbgems/mruby-pack
* mrbgems/mruby-sprintf
|
|
'stdio.h' is included in 'mruby.h' ('mrbconf.h').
However, keep 'stdio.h' used by mruby-test.
|
|
|
|
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in
my environment than before the introduction of new specifiers/modifiers
(5116789a) with this change.
------------+-------------------+-------------------+--------
BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO
------------+-------------------+-------------------+--------
mruby | 593416 bytes | 593208 bytes | -0.04%
libmruby.a | 769048 bytes | 767264 bytes | -0.23%
------------+-------------------+-------------------+--------
BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613,
so I put it back.
|
|
For example, `"".unpack("")` evaluates to `[]`.
|
|
The pack/unpack "m" directive should be treated as a length rather than
an element count.
|
|
|
|
|
|
|
|
|
|
The argument is converted to fixnum before calling.
|
|
|
|
|
|
The `MRB_ENDIAN_BIG` macro is originally used for `NaN` boxing.
We cannot assume it is defined on every big endian platform (#4190
is the case). So instead of relying on untrusted `MRB_ENDIAN_BIG`, we
use `BYTE_ORDER` macro with a fallback function to check endian in
runtime.
|
|
The ISO standard does not include implicit type conversion using
`to_int`. This implicit conversion often causes vulnerability.
There will be no more attacks like #4120.
In addition, we have added internal convenience method `__to_int` which
does type check and conversion (from floats).
|
|
|
|
The ISO standard does not include implicit type conversion using
`to_int`, `to_str` and sometimes `to_f`. For the compactness of the
mruby implementation, maybe we should remove those implicit conversion
from mruby.
|
|
|
|
|
|
`mrb_raisef()` only takes `%S` specifier. If you don't have extra
arguments, use `mrb_raise()`.
|
|
The fix was proposed by https://hackerone.com/aerodudrizzt
|
|
The issue (and the fix) reported by https://hackerone.com/aerodudrizzt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git-subtree-dir: mrbgems/mruby-pack
git-subtree-mainline: 842e6945f2d0a519d7cf0525016830246cd337ab
git-subtree-split: 383a9c79e191d524a9a2b4107cc5043ecbf6190b
|