LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 30643 - libc++experimental built w/ UBSAN has undefined references to __muloti4 builtin
Summary: libc++experimental built w/ UBSAN has undefined references to __muloti4 builtin
Status: REOPENED
Alias: None
Product: libc++
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P normal
Assignee: Eric Fiselier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 22:03 PDT by Eric Fiselier
Modified: 2018-07-25 22:54 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Fiselier 2016-10-07 22:03:31 PDT
For some reason the typical GNU libraries don't provide this builtin, but libclang_rt.builtins-x86_64.a does. This means that the user must manually link the libclang builtins to get UBSAN to work.

The missing builtin is required when doing 128-bit integer multiplication in filesystem.

I'm filing this bug as a reminder to fix this.
Comment 1 Eric Fiselier 2016-10-09 23:26:42 PDT
I removed usages of __int128_t in r283712, which fixes this bug.
Comment 2 Eric Fiselier 2018-07-25 16:47:01 PDT
We once again use __int128_t in filesystem, so this bug has cropped up again.

I think as a temporary fix, libc++ can crib the mul0ti4 implementation from compiler-rt and compile it into filesystem manually.

I'll look into more involved fixes as well.