bc: declare interntional unsafe fixnum arithmetic
Eliminate overflow errors from fixnum test when racket bc compiled with --enable-ubsan (issue #2314)
This commit is contained in:
parent
d24cbd4344
commit
659741bb58
4
.github/workflows/ci-ubsan.yml
vendored
4
.github/workflows/ci-ubsan.yml
vendored
|
@ -84,7 +84,9 @@ jobs:
|
|||
continue-on-error: true
|
||||
run: raco test -l tests/db/all-tests | tee logs/db-all-tests.log
|
||||
- name: Gather runtime errors
|
||||
run: grep 'runtime error' logs/*.log > runtime-errors_git${{ github.sha }}.log
|
||||
run: |
|
||||
grep 'runtime error' logs/*.log > runtime-errors_git${{ github.sha }}.log || true
|
||||
test ! -s runtime-errors_git${{ github.sha }}.log
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: runtime-errors_git${{ github.sha }}
|
||||
|
|
|
@ -1228,7 +1228,14 @@ static Scheme_Object *fx_abs(int argc, Scheme_Object *argv[])
|
|||
return o;
|
||||
}
|
||||
|
||||
#define UNSAFE_FX(name, op, fold, zero_args, PRE_CHECK) \
|
||||
#if __GNUC__ >= 8 || __clang_major__ >= 4
|
||||
# define NO_SANITIZE_SIGNED_INTEGER_OVERFLOW \
|
||||
__attribute__((no_sanitize("signed-integer-overflow")))
|
||||
#else
|
||||
# define NO_SANITIZE_SIGNED_INTEGER_OVERFLOW
|
||||
#endif
|
||||
#define UNSAFE_FX(name, op, fold, zero_args, PRE_CHECK) \
|
||||
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW \
|
||||
static Scheme_Object *name(int argc, Scheme_Object *argv[]) \
|
||||
{ \
|
||||
intptr_t v; \
|
||||
|
|
Loading…
Reference in New Issue
Block a user