Project

General

Profile

Actions

Bug #17646

closed

Check for `__builtin_mul_overflow` with `long long` arguments

Added by xtkoba (Tee KOBAYASHI) about 3 years ago. Updated 7 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-02-19 master a319c04818) [i686-linux]
[ruby-core:<unknown>]

Description

For some 32-bit targets, when Clang/LLVM is set up without compiler-rt, __builtin_mul_overflow does exist but is not usable with long long arguments. In this situation, make stops with the following message:

linking miniruby
ld.lld: error: undefined symbol: __mulodi4
>>> referenced by process.c:8037
>>>               process.o:(timetick2integer)
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:278: miniruby] Error 1

The usability of __builtin_mul_overflow with long long arguments have to be checked within ./configure. A patch is attached for that. Note that optimizations have to be disabled for the compilation of the test code.


Files

Actions #1

Updated by jeremyevans (Jeremy Evans) 7 months ago

  • Status changed from Open to Closed

Applied in changeset git|b635388a900206b673fc23b5442345236b84cd75.


Check that __builtin_mul_overflow can handle long long

Fixes [Bug #17646]

Patch from xtkoba (Tee KOBAYASHI)

Actions

Also available in: Atom PDF

Like0
Like0