Closed RyanGlScott closed 5 months ago
I assume the generalization of zero v.s. non-zero in isinf and isnan tests is due to different return values from the different OS environments?
Yes. I added this to the commit message:
On Ubuntu,
isinf(x)
will return1
ifx
is positive infinity and-1
ifx
is negative infinity. The C standard doesn't guarantee this, however, as it only requires thatisinf(x)
return some non-zero value ifx
is infinite. More to the point, Apple Clang's version ofisinf
doesn't return the same values that Ubuntu's Clang does, but theisinf.c
test case in thecrux-llvm
test suite specifically checks for these values, making the test fail on macOS.This patch makes the checks in
isinf.c
more general so that they will pass regardless of which non-zero value gets returned fromisinf(x)
.
Previously, we concocted a
clang-withIncl
script for running Clang on macOS CI runners, but this neglected to pass any arguments to Clang (among other issues). This patch replaces theclang-withIncl
machinery with a much simpler, Homebrew-based setup for install Clang/LLVM. With this in place, we can finally run thecrux-llvm
test suite on macOS.Fixes https://github.com/GaloisInc/crucible/issues/999.
Running the test suite on macOS reveals several additional issues, among them #885 and #1013. This PR also applies a series of fixes for these issues.