[PATCH] D67999: Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 10:30:42 PDT 2019


rupprecht added a reviewer: efriedma.
rupprecht added a subscriber: efriedma.
rupprecht added a comment.

@efriedma reviewed my original change, so may also have context on this.

In D67999#1682753 <https://reviews.llvm.org/D67999#1682753>, @compnerd wrote:

> ... the problem is that `__builtin_logb`  **can** be misused to implement a library ...


The method here is `__compiler_rt_logbX` (defined as `__compiler_rt_logbf` etc.), not `__builtin_logb`. Any code that generates a call to `__builtin_logb` would need that to be satisfied by linking against libm for the `logb` symbol definition, not compiler-rt.

IIRC, when I tested this a long time ago by building the builtins library and poking it with nm, none of the `__compiler_rt_logbX` methods were being exposed (due to `static __inline`), so I'm not sure how this could be misused to implement a library outside of compiler-rt. I may be missing something.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67999/new/

https://reviews.llvm.org/D67999





More information about the llvm-commits mailing list