Age | Commit message (Collapse) | Author |
|
This changeset is to kill future possibility of bugs similar to
CVE-2019-11932. The vulnerability occurs when reallocarray(3)
(which is a variant of realloc(3) and roughly resembles our
ruby_xmalloc2()) returns NULL. In our C API, ruby_xmalloc()
never returns NULL to raise NoMemoryError instead. ruby_xfree()
does not return NULL by definition. ruby_xrealloc() on the other
hand, _did_ return NULL, _and_ also raised sometimes. It is very
confusing. Let's not do that. x-series APIs shall raise on
error and shall not return NULL.
Notes:
Merged: https://github.com/ruby/ruby/pull/2540
|
|
This changeset basically replaces `ruby_xmalloc(x * y)` into
`ruby_xmalloc2(x, y)`. Some convenient functions are also
provided for instance `rb_xmalloc_mul_add(x, y, z)` which allocates
x * y + z byes.
Notes:
Merged: https://github.com/ruby/ruby/pull/2540
|
|
Make them gcc friendly. Note that realloc canot be __malloc__
attributed, according to the GCC manual.
Notes:
Merged: https://github.com/ruby/ruby/pull/2540
|
|
Seems nobody has actually used this macro. Such an obvious typo.
Notes:
Merged: https://github.com/ruby/ruby/pull/2540
|
|
|
|
Show the size of String.
To see the whole contents even after NUL char:
```
(lldb) rp str
(const char [5]) $1 = "x"
(lldb) memory read -s1 --format x --count `sizeof($1)` -- &$1 0x1010457a8: 0x78 0x00 0x61 0x61 0x61
```
|
|
Use GetLocation to get the address of embedded array.
|
|
Fixes [Bug #11275]
Notes:
Merged: https://github.com/ruby/ruby/pull/2535
|
|
|
|
`8 * RbConfig::SIZEOF` ... is not straight.
|
|
Sync to ruby/bigdecimal@92356ba71c6bd325b0ab618c634a7aecf8cdc767
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
These macros should make it easier to C extensions to switch to
the Ruby 2.7 C-API *_kw functions, but still have the code work
correctly on older Ruby versions.
|
|
There is no need for these in Ruby 3.0, and the plan is to
remove them.
|
|
|
|
Sweep step checks `heap_pages_freeable_pages`, so compaction should do
the same.
|
|
I think we need to be moving empty pages to the tomb after they become
empty.
|
|
`T_MOVED` is a linked list, so we can just iterate through the `T_MOVED`
objects, clearing them out and adding them to respective free lists.
|
|
|
|
pointed out by ruby-trunk-changes
|
|
There are libraries that use define_method with argument splats
where they would like to pass keywords through the method. To
more easily allow such libraries to use ruby2_keywords to handle
backwards compatibility, it is necessary for ruby2_keywords to
support bmethods.
Notes:
Merged: https://github.com/ruby/ruby/pull/2532
|
|
|
|
- `info.yml` is for ruby/www.ruby-lang.org/_data/releases.yml
- `info.json` is meta data for users of snapshot
|
|
It will not use in `ruby/actions`, and `default=tmp` is not correct.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2533
|
|
|
|
|
|
It's fixed for JRuby dedicatedly.
|
|
|
|
This reverts commit f62f90367fc3bce6714e7c34cbd040e14e43fe07.
|
|
This is follow up of r67315.
|
|
|
|
|
|
WIDEVALUE differs from VALUE in 32bit platform, but some codes assume
that they are the same.
There is `#define STRUCT_WIDEVAL` mode to check the consistency.
This change allows to build with STRUCT_WIDEVAL.
|
|
to suppress a warning in OpenBSD.
```
ossl_ssl.c:938:31: warning: incompatible pointer types passing 'SSL_SESSION *(SSL *, unsigned char *, int, int *)' (aka 'struct ssl_session_st *(struct ssl_st *, unsigned char *, int, int *)') to parameter of type 'SSL_SESSION *(*)(struct ssl_st *, const unsigned char *, int, int *)' (aka 'struct ssl_session_st *(*)(struct ssl_st *, const unsigned char *, int, int *)') [-Wincompatible-pointer-types]
SSL_CTX_sess_set_get_cb(ctx, ossl_sslctx_session_get_cb);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ssl.h:738:20: note: passing argument to parameter 'get_session_cb' here
SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl,
^
1 warning generated.
```
|
|
|
|
Follow up of 5717e55e9a7790c938afa694a9bf558c0e54bb83.
Adding a header with newline broke linenos.
|
|
This reverts commits:
* 2a490d5660ac869f8f2bbcec4887b1dc2950643f
Suppress assert_match warnings.
* d4a86e407ec2057c2c7ad757aa76dad757f34c3a
Assert warnings message for the last argument is keyword parameter.
|
|
|
|
https://bugs.ruby-lang.org/issues/16189
https://github.com/rubygems/rubygems/commit/e331222163
|
|
https://github.com/rubygems/rubygems/commit/bde88f00a1
|
|
https://github.com/rubygems/rubygems/commit/05146bb2fd
|
|
https://github.com/rubygems/rubygems/commit/892bfc11fe
|
|
The arity of this method has been -1 since the import, so the
option has been passed always, even if Zlib::GzipReader#initialize
does not take the option. Actually it takes the option since 1.9.
https://github.com/rubygems/rubygems/commit/2fcde0f4e0
|
|
For better messages at failures.
https://github.com/rubygems/rubygems/commit/971455b16e
|
|
It is `assert_eqal(expected, actual)`.
https://github.com/rubygems/rubygems/commit/1d6197a090
|
|
MINSIGSTKSZ is unsigned int in OpenBSD, which makes a warning of
comparison:
```
signal.c:535:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (size < MINSIGSTKSZ)
~~~~ ^ ~~~~~~~~~~~
1 warning generated.
```
https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191004T200009Z.log.html.gz
|
|
char is not always signed. In fact, it is unsigned in arm.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20191004T181708Z.log.html.gz
```
compiling parser.c
parser.rl: In function ‘unescape_unicode’:
parser.rl:50:5: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (b < 0) return UNI_REPLACEMENT_CHAR;
^
```
|
|
to parser.c.
|
|
There have been some direct changes in parser.c which is automatically
generated from parser.rl. This updates parser.rl to sync the changes:
* 91793b8967e0531bd1159a8ff0cc7e50739c7620
* 79ead821dd4880725c9c6bb9645b3fad71715c5b
* 80b5a0ff2a7709367178f29d4ebe1c54122b1c27
|