libgo patch committed: Skip testSetPanicOnFault when using LLVM

Message ID
State New
Headers show
  • libgo patch committed: Skip testSetPanicOnFault when using LLVM
Related show

Commit Message

Ian Lance Taylor Oct. 9, 2018, 4:51 p.m.
This patch by Cherry Zhang skips the testSetPanicOnFault tests when
using gollvm.  LLVM doesn't support non-call exceptions. This test was
passing more or less by luck: if the faulting instruction is between
two calls with the same landing pad (in instruction layout order, not
the program's logic order), it generates a merged PC range that covers
the faulting instruction. If the instruction layout order changes, or
it uses two different (but may be degenerate) landing pads, this
doesn't work.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.



Index: gcc/go/gofrontend/MERGE
--- gcc/go/gofrontend/MERGE	(revision 264932)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/runtime/runtime_test.go
--- libgo/go/runtime/runtime_test.go	(revision 264813)
+++ libgo/go/runtime/runtime_test.go	(working copy)
@@ -166,6 +166,9 @@  func TestSetPanicOnFault(t *testing.T) {
 func testSetPanicOnFault(t *testing.T, addr uintptr, nfault *int) {
+	if strings.Contains(Version(), "llvm") {
+		t.Skip("LLVM doesn't support non-call exception")
+	}
 	if GOOS == "nacl" {
 		t.Skip("nacl doesn't seem to fault on high addresses")