go: cmd/compile: floating-point broken on android-arm-corellium builder

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

I can reproduce with C.

#include <stdio.h>

int geq(double x, double y) {
  return x >= y;
}

double x = 3;
double y = 4;

int main(int argc, char *argv[]) {
  for (int i = 0; i < 100000000; i++) {
    if (geq(x, y)) {
          printf("failed at iteration %d\n", i);
        }
    }
}
failed at iteration 532580
failed at iteration 19932913
failed at iteration 29020612
failed at iteration 32054460
failed at iteration 67123803
failed at iteration 70001529
failed at iteration 87241841
failed at iteration 89238362
failed at iteration 94347886

Note that it fails when compiled with arm-linux-gnueabihf-gcc (hard float) and not with arm-linux-gnueabi-gcc (soft float).

Anyone know how to contact Corellium and file a bug? Their website is not very helpful.