Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(464)

Unified Diff: test/nilptr_s390_common.go

Issue 174320043: code review 174320043: test: s390[x] specific variants of nilptr.go.
Patch Set: diff -r fe11c71dbee6c22c38c6f5037ff3ac43929e8eff https://code.google.com/p/go/ Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/nilptr_s390.go ('k') | test/nilptr_s390x.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/nilptr_s390_common.go
===================================================================
new file mode 100644
--- /dev/null
+++ b/test/nilptr_s390_common.go
@@ -0,0 +1,23 @@
+// skip
+
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Shared s390 and s390x specific test configuration
+
+package main
+
+import "unsafe"
+
+func sanityCheck() {
+ // The test only tests what we intend to test if dummy
+ // starts near minBssOffset uintptr. Otherwise there
+ // might not be anything mapped at the address that might
+ // be accidentally dereferenced below.
+ if uintptr(unsafe.Pointer(&dummy)) > inMemSize + minBssOffset {
+ panic("dummy too far out")
+ } else if uintptr(unsafe.Pointer(&dummy)) < minBssOffset {
+ panic("dummy too close")
+ }
+}
« no previous file with comments | « test/nilptr_s390.go ('k') | test/nilptr_s390x.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b