Age | Commit message (Collapse) | Author |
|
The content depends on ruby internal, not responsibility of the
caller. Revive `RUBY_GLOBAL_SETUP` macro to define the hook function.
Notes:
Merged: https://github.com/ruby/ruby/pull/12933
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
This change poisons the whole slot of the object rather than just the flags.
This allows ASAN to find any reads/writes into the slot after it has been
freed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Newer GCCs have __has_feature and older ones have
__SANITIZE_ADDRESS__[1]. Relevant since ASAN with GCC 11 on the popular
Ubuntu Jammy failed to build previously.
[1]: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/cpp/Common-Predefined-Macros.html
|
|
There's no case for when RUBY_MSAN_ENABLED, so the macro ends up doing
nothing when it should instead have __attribute__((__no_sanitize__("memory"))).
Notes:
Merged: https://github.com/ruby/ruby/pull/12219
|
|
```
internal/sanitizers.h:57:26: error: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
57 | COMPILER_WARNING_PUSH; \
| ^
```
and so many.
Remove semicolons following pragma, and repeat the given declaration
at the end to consume a semicolon following the macro call. As many
`NO_SANITIZE` calls including bigdecimal that is a gem have a trailing
semicolon, it was not able to move the semicolon inside `NO_SANITIZE`.
|
|
Otherwise trying to deref the pointer can cause an ASAN crash, even
though the only reason we're dereferencing it is so that we can assert
on it.
Notes:
Merged: https://github.com/ruby/ruby/pull/11660
|
|
|
|
|
|
ASAN leaves a pointer to the fake frame on the stack; we can use the
__asan_addr_is_in_fake_stack API to work out the extent of the fake
stack and thus mark any VALUEs contained therein.
[Bug #20001]
|
|
__has_feature is a clang-ism, and GCC has a different way to tell if
sanitizers are enabled. For this reason, I don't want to spray
__has_feature all over the codebase for other places where conditional
compilation based on sanitizers is required.
[Bug #20001]
|
|
Where a local variable is used as part of the stack bounds detection, it
has to actually be on the stack. ASAN can put local variable on "fake
stacks", however, with addresses in different memory mappings. This
completely destroys the stack bounds calculation, and can lead to e.g.
things not getting GC marked on the machine stack or stackoverflow
checks that always fail.
The __asan_addr_is_in_fake_stack helper can be used to get the _real_
stack address of such variables, and thus perform the stack size
calculation properly
[Bug #20001]
|
|
This reverts commit 6185cfdf38e26026c6d38220eeca48689e54cdcf.
|
|
This reverts commit bdafad879093ef16a9a649154c4b2e4ebf492656.
|
|
This reverts commit d10bc3a2b8300cffc383e10c3730871e851be24c.
|
|
ASAN leaves a pointer to the fake frame on the stack; we can use the
__asan_addr_is_in_fake_stack API to work out the extent of the fake
stack and thus mark any VALUEs contained therein.
[Bug #20001]
|
|
__has_feature is a clang-ism, and GCC has a different way to tell if
sanitizers are enabled. For this reason, I don't want to spray
__has_feature all over the codebase for other places where conditional
compilation based on sanitizers is required.
[Bug #20001]
|
|
Where a local variable is used as part of the stack bounds detection, it
has to actually be on the stack. ASAN can put local variable on "fake
stacks", however, with addresses in different memory mappings. This
completely destroys the stack bounds calculation, and can lead to e.g.
things not getting GC marked on the machine stack or stackoverflow
checks that always fail.
The __asan_addr_is_in_fake_stack helper can be used to get the _real_
stack address of such variables, and thus perform the stack size
calculation properly
[Bug #20001]
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7461
|
|
These contents are purely implementation details, not worth appearing in
CAPI documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
To fix build failures.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
Devs do not love "3". The only exception is RUBY3_KEYWORDS in parse.y,
which seems unrelated to our interests.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
This shall fix compile errors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
Ditto for 4b853932eaa7fa4acf8a0f0c9b7c695bb4f5e76d
|
|
According to MSVC manual (*1), cl.exe can skip including a header file
when that:
- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.
GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).
Sun C lacked #pragma once for a looong time. Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.
This changeset modifies header files so that each of them include
strictly one #ifndef...#endif. I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]
*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Notes:
Merged: https://github.com/ruby/ruby/pull/3023
|
|
Split ruby.h
Notes:
Merged-By: shyouhei <[email protected]>
|
|
|
|
Rearrange macro orders for better readability.
Notes:
Merged: https://github.com/ruby/ruby/pull/2711
|
|
One day, I could not resist the way it was written. I finally started
to make the code clean. This changeset is the beginning of a series of
housekeeping commits. It is a simple refactoring; split internal.h into
files, so that we can divide and concur in the upcoming commits. No
lines of codes are either added or removed, except the obvious file
headers/footers. The generated binary is identical to the one before.
Notes:
Merged: https://github.com/ruby/ruby/pull/2711
|