Adds sys.Walltime and sys.Nanotime for security and determinism (#616)
This adds two clock interfaces: sys.Walltime and sys.Nanotime to allow implementations to override readings for purposes of security or determinism. The default values of both are a fake timestamp, to avoid the sandbox break we formerly had by returning the real time. This is similar to how we don't inherit OS Env values.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
var testCode, _ = io.ReadAll(io.LimitReader(rand.Reader, 8*1024))
|
||||
|
||||
func Test_MmapCodeSegment(t *testing.T) {
|
||||
if !IsSupported() {
|
||||
if !CompilerSupported() {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func Test_MmapCodeSegment(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_MunmapCodeSegment(t *testing.T) {
|
||||
if !IsSupported() {
|
||||
if !CompilerSupported() {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user