Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GCC/Clang builtins for overflows checking #4447

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Apr 19, 2024

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Because #4363 was abandoned and with errors, respin it from scratch.

Use GCC/LLVM builtins for overflow checking when available.

Test plan

CI is green

Closing issues

Closes #4356

@wargio
Copy link
Member

wargio commented May 9, 2024

Translation unit diagnostic at <rizin/librz/include/rz_types_overflow.h:109:1>: use of unknown builtin '__builtin_mul_overflow_p'
Translation unit diagnostic at <rizin/librz/include/rz_types_overflow.h:110:1>: use of unknown builtin '__builtin_mul_overflow_p'
Translation unit diagnostic at <rizin/librz/include/rz_types_overflow.h:111:1>: use of unknown builtin '__builtin_mul_overflow_p'
Translation unit diagnostic at <rizin/librz/include/rz_types_overflow.h:112:1>: use of unknown builtin '__builtin_mul_overflow_p'
Translation unit diagnostic at <rizin/librz/include/rz_util/rz_buf.h:70:7>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/util/buf.c:1393:24>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/util/skyline.c:16:3>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/util/skyline.c:65:2>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/util/sdb/src/array.c:157:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/socket/socket_http_server.c:109:7>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/io/io.c:480:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/io/io_cache.c:99:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/io/io_cache.c:137:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/bin/p/bin_symbols.c:111:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/bin/format/dex/dex.c:86:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/bin/format/mach0/dyldcache.c:943:59>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/bin/format/mach0/mach0.c:2673:7>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/bin/format/pyc/marshal.c:329:15>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/arch/fcn.c:61:19>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/arch/fcn.c:246:8>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/arch/fcn.c:251:34>: use of unknown builtin '__builtin_sub_overflow_p'
Translation unit diagnostic at <rizin/librz/arch/fcn.c:2274:6>: use of unknown builtin '__builtin_sub_overflow_p'
Translation unit diagnostic at <rizin/librz/core/cbin.c:849:18>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/core/core.c:2020:9>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/core/disasm.c:1386:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/core/seek.c:154:19>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/core/serialize_core.c:461:6>: use of unknown builtin '__builtin_add_overflow_p'
Translation unit diagnostic at <rizin/librz/core/cmd/cmd_write.c:227:6>: use of unknown builtin '__builtin_add_overflow_p'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use GCC/Clang builtins for overflows checking
3 participants