• David du Colombier's avatar
    runtime: don't use FP when calling nextSample in the Plan 9 sighandler · 31430bda
    David du Colombier authored
    In the Go signal handler on Plan 9, when a signal with
    the _SigThrow flag is received, we call startpanic before
    printing the stack trace.
    
    The startpanic function calls systemstack which calls
    startpanic_m. In the startpanic_m function, we call
    allocmcache to allocate _g_.m.mcache. The problem is
    that allocmcache calls nextSample, which does a floating
    point operation to return a sampling point for heap profiling.
    
    However, Plan 9 doesn't support floating point in the
    signal handler.
    
    This change adds a new function nextSampleNoFP, only
    called when in the Plan 9 signal handler, which is
    similar to nextSample, but avoids floating point.
    
    Change-Id: Iaa30437aa0f7c8c84d40afbab7567ad3bd5ea2de
    Reviewed-on: https://go-review.googlesource.com/16307Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    31430bda
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...