mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
interp: add 'max depth' parameter to limit cost
This commit is contained in:
+6
-5
@@ -22,11 +22,12 @@ func TestTraceback(t *testing.T) {
|
||||
// Build a small binary that only panics.
|
||||
tmpdir := t.TempDir()
|
||||
config, err := builder.NewConfig(&compileopts.Options{
|
||||
GOOS: runtime.GOOS,
|
||||
GOARCH: runtime.GOARCH,
|
||||
Opt: "z",
|
||||
InterpTimeout: time.Minute,
|
||||
Debug: true,
|
||||
GOOS: runtime.GOOS,
|
||||
GOARCH: runtime.GOARCH,
|
||||
Opt: "z",
|
||||
InterpTimeout: time.Minute,
|
||||
InterpMaxDepth: 10,
|
||||
Debug: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user