cmd/compile: panic: runtime error: floating point error when building on FreeBSD armv6 on RPi-B #39816
Comments
Weird. That chip should have hard float support.
A few other, lower priority things to try if you have the time:
|
Change https://golang.org/cl/239999 mentions this issue: |
Hi @randall77!
I wrote a simple C program which does some simple float calculation and comparison against +-Infinity from math.h. Works as expected.
The instruction seems to be
Will do and give another update.
I tried with 1.14 from http://github.com/dmgk/go-bootstrap (default bootstrap on FreeBSD ports) too with the same error. The disassembly above is from 1.14.
|
I can't get a freebsd/arm machine at the moment but on linux/arm I see this:
It's the same instructions, but it disassembles differently. |
Could you post your C code test and the disassembly of it? |
I've tried some things in the last few days, including compiling with GOARM=5, which seems to work just fine. I've also upgraded my system to FreeBSD 13-CURRENT from 2020-06-25, which produces the same error when compiling with GOARM=6. The C test code I wrote is:
Compiled with -O0, the full disassembly made with objdump from binutils-2.33.1_2,1 on FreeBSD 13-CURRENT is:
I‘ll disassemble the bootstrap compiler later with 13-CURRENT. Please let me know if you need anything else. I could also provide SSH to a FreeBSD on RPi-B if you like. Thank you very much! |
Your C code does produce the same instruction that was faulting in the Go code. I don't understand how the Go program faults on that instruction, but the C code passes. |
Is there some metadata in the elf header that may be missing in the go binary? Something that suggests the FP model used in the binary? |
I've attached the full disassembly. Created with FreeBSD 13-CURRENT, go bootstrap 1.14. I will reach out to the FreeBSD ARM community today, maybe any of them has another idea. |
Just like SIGILL, it might be useful to see what the instruction that generated the SIGFPE is. Update #39816 Change-Id: I8b2ff692998f0b770289339537dceab96b09d1ee Reviewed-on: https://go-review.googlesource.com/c/go/+/239999 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?go1.4 bootstrap
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to build go1.14.4
What did you expect to see?
A successful build of go1.14.4
What did you see instead?
Build fails with SIGFPE. The output below comes from a build from FreeBSD ports. Building from source directly (using go1-4 bootstrap) results in the same error.
The text was updated successfully, but these errors were encountered: