Age | Commit message (Collapse) | Author |
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2544
|
|
|
|
This typo introduced memory corruption when __builtin_add_overflow
is not available but uint128_t is. GCC before 5 are one of such
situatins.
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-master/log/20191009T120004Z.log.html.gz
|
|
The st_is_member DEFINE has simpler semantics, for more readable code.
Notes:
Merged: https://github.com/ruby/ruby/pull/1622
|
|
|
|
On Android, a signal handler that is not SIG_DFL is set by default for
SIGSEGV. Ruby's install_sighandler inserts Ruby's handler only when the
signal has no handler, so it does not insert Ruby's SEGV report handler,
which caused some test failures.
This changeset forces to install Ruby's handler for some fatal signals
(sigbus, sigsegv, and sigill). They keep the original handlers, and
call them when the interpreter receives the signals.
|
|
Just refactoring.
The name "rb_bug_context" is completely unclear for me.
(Can you see that "context" means "machine register context"?)
The context is available only when a fatal signal (sigbus, sigsegv, or
sigill) is received; in fact, the function is used only for fatal
signals. So, I think the name should be changed.
|
|
The three functions for fatal signals, sigbus, sigsegv, and sigill, are
a family. The definition of ruby_abort had interrupted them for no
reason. This change just moves the definition after the family.
|
|
|
|
A method call is often with `argc = 1` and `argv = &v` where v is a
VALUE, and some functions shift the arguments by `argc-1` and `argv+1`
(for example, rb_sym_proc_call). I'm unsure whether it is safe or not
to pass a pointer `argv+1` to memcpy with zero length, but Coverity Scan
complains it. So this attempts to suppress the warning by explicit
check of the length.
|
|
as the file is not executable anyway.
Notes:
Merged: https://github.com/ruby/ruby/pull/2483
|
|
|
|
The declaration of local variable in loop, it will initialize local variable for each run of the loop with clang generated code.
So, it shouldn't declare the local variable in heavy loop.
Array#sum with float elements will be faster around 30%.
* Before
user system total real
3.320000 0.010000 3.330000 ( 3.336088)
* After
user system total real
2.590000 0.010000 2.600000 ( 2.602399)
* Test code
require 'benchmark'
Benchmark.bmbm do |x|
ary = []
10000.times { ary << Random.rand }
x.report do
50000.times do
ary.sum
end
end
end
|
|
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.
```
|
|
|