go-metrics icon indicating copy to clipboard operation
go-metrics copied to clipboard

fix panic if the GOOS doesn't support strict IEEE

Open snyh opened this issue 7 years ago • 1 comments

the default TimerGranularity is zero, and divide zero will cause SIGFPE if the code doesn't support strict IEEE.

This will be happen in gccgo under some special platform.

  panic: runtime error: floating point error
  [signal SIGFPE: floating-point exception code=7 addr=4859750620 pc=4859750621]

And check the zero will improve the default performances by removing the operations about time.Now.

snyh avatar Mar 27 '18 09:03 snyh

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Sep 30 '22 21:09 hashicorp-cla