• Elias Naur's avatar
    runtime: abort on fatal errors and panics in c-shared and c-archive modes · b3a8b057
    Elias Naur authored
    The default behaviour for fatal errors and runtime panics is to dump
    the goroutine stack traces and exit with code 2. However, when the process is
    owned by foreign code, it is suprising and inappropriate to suddenly exit
    the whole process, even on fatal errors. Instead, re-use the crash behaviour
    from GOTRACEBACK=crash and abort.
    
    The motivating use case is issue #11382, where an Android crash reporter
    is confused by an exiting process, but I believe the aborting behaviour
    is appropriate for all cases where Go does not own the process.
    
    The change is simple and contained and will enable reliable crash reporting
    for Android apps in Go 1.5, but I'll leave it to others to judge whether it
    is too late for Go 1.5.
    
    Fixes #11382
    
    Change-Id: I477328e1092f483591c99da1fbb8bc4411911785
    Reviewed-on: https://go-review.googlesource.com/12032Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b3a8b057
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...