Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(gnovm) Fmt function in testing environment crash the whole function #2988

Closed
0xtekgrinder opened this issue Oct 20, 2024 · 1 comment
Closed

Comments

@0xtekgrinder
Copy link
Contributor

Fmt function in testing environment crash the whole function

Description

When adding a function from the fmt package in a testing environment, the whole function is crashing

Your environment

  • Go version: go1.23.1
  • OS and CPU architecture: MacOS AMD64
  • Gno commit hash causing the issue: 05cd4f5

Steps to reproduce

Expected behaviour

The test should pass and we should see at least once the "in" log

Actual behaviour

The test crash

Logs

=== RUN   Test
--- PASS: Test (0.02s)
=== RUN   TestUserPerms
.: test pkg: panic: reflect: reflect.Value.Set using value obtained using unexported field
stack:
goroutine 1 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:26 +0x64
main.runTestFiles.func1()
        /Users/darkside/gno/gnovm/cmd/gno/test.go:427 +0x48
panic({0x1030200e0?, 0x140093810b0?})
        /usr/local/go/src/runtime/panic.go:785 +0x124
reflect.flag.mustBeAssignableSlow(0x10?)
        /usr/local/go/src/reflect/value.go:254 +0xb4
reflect.flag.mustBeAssignable(...)
        /usr/local/go/src/reflect/value.go:244
reflect.Value.Set({0x103010a80?, 0x140069b3560?, 0x1?}, {0x103010a80?, 0x1400c474570?, 0x1024a3314?})
        /usr/local/go/src/reflect/value.go:2307 +0x58
github.com/gnolang/gno/gnovm/pkg/gnolang.gno2GoValue(0x14005ba3220, {0x103010a80?, 0x140069b3560?, 0x10?})
        /Users/darkside/gno/gnovm/pkg/gnolang/gonative.go:1158 +0x684
github.com/gnolang/gno/gnovm/pkg/gnolang.gno2GoValue(0x140004e2208, {0x103056800?, 0x14009380ff0?, 0x10?})
        /Users/darkside/gno/gnovm/pkg/gnolang/gonative.go:1183 +0x9a0
github.com/gnolang/gno/gnovm/pkg/gnolang.ConvertTo(0x0, {0x1031b3808, 0x14000410460}, 0x140004e2208, {0x1031a2de0, 0x14008b80f90?})
        /Users/darkside/gno/gnovm/pkg/gnolang/values_conversions.go:57 +0x180
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).doOpConvert(0x14000322908)
        /Users/darkside/gno/gnovm/pkg/gnolang/op_expressions.go:779 +0xb0
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).Run(0x14000322908)
        /Users/darkside/gno/gnovm/pkg/gnolang/machine.go:1492 +0x6c0
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).Eval(0x14000322908, {0x1031a8880, 0x1400da60300})
        /Users/darkside/gno/gnovm/pkg/gnolang/machine.go:884 +0x57c
main.runTestFiles(0x14000322908, 0x1400000d458, {0x14000409040, 0x3}, 0x1, 0x0, {0x0, 0x0}, {0x1031ab9d0, 0x14000405590})
        /Users/darkside/gno/gnovm/cmd/gno/test.go:453 +0x2a4
main.gnoTestPkg({0x16d96f3e9, 0x1}, {0x140003910f0?, 0x1, 0x7?}, {0x0, 0x0, 0x0?}, 0x14000367980, {0x1031ab9d0, ...})
        /Users/darkside/gno/gnovm/cmd/gno/test.go:298 +0xe74
main.execTest(0x14000367980, {0x140003910a0?, 0x1?, 0x1?}, {0x1031ab9d0, 0x14000405590})
        /Users/darkside/gno/gnovm/cmd/gno/test.go:197 +0x35c
main.newTestCmd.func1({0x0?, 0x140000300f0?}, {0x140003910a0?, 0x14000362420?, 0x0?})
        /Users/darkside/gno/gnovm/cmd/gno/test.go:98 +0x3c
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x1400038ef20?, {0x10319de60?, 0x10385b520?})
        /Users/darkside/gno/tm2/pkg/commands/command.go:255 +0x174
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x1400038ef20?, {0x10319de60?, 0x10385b520?})
        /Users/darkside/gno/tm2/pkg/commands/command.go:259 +0x124
github.com/gnolang/gno/tm2/pkg/commands.(*Command).ParseAndRun(0x1400038ef20, {0x10319de60, 0x10385b520}, {0x140000300d0?, 0x1400038f4a0?, 0x1400038f550?})
        /Users/darkside/gno/tm2/pkg/commands/command.go:140 +0x4c
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Execute(0x1031ab9d0?, {0x10319de60?, 0x10385b520?}, {0x140000300d0?, 0x1037b5fb8?, 0x140000021c0?})
        /Users/darkside/gno/tm2/pkg/commands/command.go:117 +0x28
main.main()
        /Users/darkside/gno/gnovm/cmd/gno/main.go:13 +0x6c

gno machine: Machine:
    CheckTypes: false
    Op: [OpHalt OpBody OpRangeIter OpPopBlock OpBody OpReturn OpBody OpPopResults OpExec OpBody OpPopResults OpExec OpBody OpPopResults OpExec OpBody OpPopResults OpExec OpBody OpRangeIter OpRangeIter OpPopBlock OpIfCond OpBody OpPopResults OpPrecall]
    Values: (len: 12)
          #11 ("p: " string)
          #10 (gonative{0x102cd18b0} gonative{func(...interface {}) (int, error)})
          #9 (<gno.land/p/demo/acl.perm>.Equal(p gno.land/p/demo/acl.perm,p2 gno.land/p/demo/acl.perm)( bool) func(p2 gno.land/p/demo/acl.perm)( bool))
          #8 (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms)
          #7 (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] []gno.land/p/demo/acl.perm)
          #6 (<*gno.land/p/demo/acl.Directory>.removePermsFromBucket(d *gno.land/p/demo/acl.Directory,bucket string,p []gno.land/p/demo/acl.perm)() func(bucket string,p []gno.land/p/demo/acl.perm)())
          #5 (<*gno.land/p/demo/acl.Directory>.RemoveUserPerm(d *gno.land/p/demo/acl.Directory,addr std.Address,verb string,resource string)() func(addr std.Address,verb string,resource string)())
          #4 (TestUserPerms testing.testingFunc)
          #3 (tRunner func(t *testing.T,fn testing.testingFunc,verbose bool)())
          #2 (RunTest func(runFlag string,verbose bool,test testing.InternalTest)(ret string))
          #1 (slice[(struct{("Test" string),(Test testing.testingFunc)} testing.InternalTest),(struct{("TestUserPerms" string),(TestUserPerms testing.testingFunc)} testing.InternalTest),(struct{("TestUserGroups" string),(TestUserGroups testing.testingFunc)} testing.InternalTest)] []testing.InternalTest)
          #0 (runtest func(name string)(report string))
    Exprs:
          #0 fmt<VPBlock(2,0)>.Println((const ("p: " string)), (const-type gonative{interface {}})(p<VPBlock(1,0)>))
    Stmts:
          #14 bodyStmt[0/0/1]=if (const (len func(x interface{})( int)))(p<VPBlock(2,0)>.verbs) != (const (len func(x interface{})( int)))(p2<VPBlock(2,1)>.verbs) { return (const (false bool)) }
          #13 bodyStmt[2/0/1]=(end)
          #12 bodyStmt[1/0/1]=(end)
          #11 bodyStmt[0/0/4]=&(d<VPBlock(1,0)>.permBuckets).Set(bucket<VPBlock(1,1)>, ps<VPBlock(1,5)>)*
          #10 return
          #9 bodyStmt[0/0/3]=(end)
          #8 return
          #7 bodyStmt[0/0/19]=shouldNotHasRole<VPBlock(3,10)>(t<VPBlock(1,0)>, dir<VPBlock(1,5)>, adm<VPBlock(1,1)>, (const ("foo" string)))
          #6 return
          #5 bodyStmt[0/0/5]=(end)
          #4 return
          #3 bodyStmt[0/0/3]=if !t<VPBlock(2,4)>.verbose && t<VPBlock(2,4)>.Failed() { t<VPBlock(2,4)>.printFailure() }
          #2 bodyStmt[0/0/1]=(end)
          #1 bodyStmt[3/1/1]=(end)
          #0 bodyStmt[0/0/1]=panic((const ("no such test: " string)) + name<VPBlock(1,0)>)*
    Blocks:
          @(1039) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393ba40,Source:func (p perm<VPBlock(2,3)>) Equa...,Parent:0x14008bc25a0)
            p: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
            p2: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
            .res_0: (false bool)
 (s vals) @(1039) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000147430,Source:func (p perm<VPBlock(2,3)>) Equa...,Parent:0x1400015ac30)
            p: (nil gno.land/p/demo/acl.perm)
            p2: (nil gno.land/p/demo/acl.perm)
            .res_0: (false bool)
 (s typs) @(1039) [gno.land/p/demo/acl.perm gno.land/p/demo/acl.perm bool]
          @(1312) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b860,Source:if perm<VPBlock(3,0)>.Equal(exis...,Parent:0x1400393b680)
 (s vals) @(1312) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000138d30,Source:if perm<VPBlock(3,0)>.Equal(exis...,Parent:0x14000368e30)
 (s typs) @(1312) []
          @(1421) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b680,Source:for i<VPBlock(1,0)>, existingPer...,Parent:0x1400393b4a0)
            i: (0 int)
            existingPerm: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (s vals) @(1421) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000368e30,Source:for i<VPBlock(1,0)>, existingPer...,Parent:0x140003691b0)
            i: (0 int)
            existingPerm: (nil gno.land/p/demo/acl.perm)
 (s typs) @(1421) [int gno.land/p/demo/acl.perm]
          @(1624) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b4a0,Source:for _<VPBlock(0,0)>, perm<VPBloc...,Parent:0x1400393a780)
            perm: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (s vals) @(1624) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140003691b0,Source:for _<VPBlock(0,0)>, perm<VPBloc...,Parent:0x14000134c30)
            perm: (nil gno.land/p/demo/acl.perm)
 (s typs) @(1624) [gno.land/p/demo/acl.perm]
          @(1805) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393a780,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14008b44960)
            d: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
            bucket: ("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string)
            p: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] []gno.land/p/demo/acl.perm)
            existing: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms)
            ok: (true bool)
            ps: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms)
 (s vals) @(1805) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000134c30,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14000148330)
            d: (nil *gno.land/p/demo/acl.Directory)
            bucket: ( string)
            p: (nil []gno.land/p/demo/acl.perm)
            existing: (undefined)
            ok: (false bool)
            ps: (nil gno.land/p/demo/acl.perms)
 (s typs) @(1805) [*gno.land/p/demo/acl.Directory string []gno.land/p/demo/acl.perm interface{} bool gno.land/p/demo/acl.perms]
          @(2546) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393a3c0,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14008b44960)
            d: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
            addr: ("g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" std.Address)
            verb: ("write" string)
            resource: ("r/demo/boards:gnolang/2" string)
            bucket: ("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string)
            p: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (s vals) @(2546) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000135030,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14000148330)
            d: (nil *gno.land/p/demo/acl.Directory)
            addr: ( std.Address)
            verb: ( string)
            resource: ( string)
            bucket: ( string)
            p: (nil gno.land/p/demo/acl.perm)
 (s typs) @(2546) [*gno.land/p/demo/acl.Directory std.Address string string string gno.land/p/demo/acl.perm]
          @(3108) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad7a40,Source:func TestUserPerms(t *(testing<V...,Parent:0x1400c45c3c0)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            adm: ("g1v9jx66twta047h6lta047h6lta047h6l8xuxz4" std.Address)
            mod: ("g1d4hkgh6lta047h6lta047h6lta047h6l6g5nfc" std.Address)
            usr: ("g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" std.Address)
            cst: ("g1vd6hxar0d4047h6lta047h6lta047h6lxys8uf" std.Address)
            dir: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
 (s vals) @(3108) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000343030,Source:func TestUserPerms(t *(testing<V...,Parent:0x140004d0630)
            t: (nil *testing.T)
            adm: ( std.Address)
            mod: ( std.Address)
            usr: ( std.Address)
            cst: ( std.Address)
            dir: (nil *gno.land/p/demo/acl.Directory)
 (s typs) @(3108) [*testing.T std.Address std.Address std.Address std.Address *gno.land/p/demo/acl.Directory]
          @(3703) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6f00,Source:func tRunner(t *(T<VPBlock(2,35)...,Parent:0x1400ab09a40)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            fn: (TestUserPerms testing.testingFunc)
            verbose: (true bool)
            start: (1729417102811766000 int64)
 (s vals) @(3703) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14008e64830,Source:func tRunner(t *(T<VPBlock(2,35)...,Parent:0x140028ea330)
            t: (nil *testing.T)
            fn: (nil testing.testingFunc)
            verbose: (false bool)
            start: (0 int64)
 (s typs) @(3703) [*testing.T testing.testingFunc bool int64]
          @(3977) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6b40,Source:func RunTest(runFlag (const-type...,Parent:0x1400ab09a40)
            runFlag: ("" string)
            verbose: (true bool)
            test: (struct{("TestUserPerms" string),(TestUserPerms testing.testingFunc)} testing.InternalTest)
            ret: ( string)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            report: (undefined)
            out: (undefined)
 (s vals) @(3977) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14008e3fc30,Source:func RunTest(runFlag (const-type...,Parent:0x140028ea330)
            runFlag: ( string)
            verbose: (false bool)
            test: (nil testing.InternalTest)
            ret: ( string)
            t: (nil *testing.T)
            report: (nil testing.Report)
            out: (nil gonative{[]uint8})
 (s typs) @(3977) [string bool testing.InternalTest string *testing.T testing.Report gonative{[]uint8}]
          @(4347) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6960,Source:if test<VPBlock(2,0)>.Name == na...,Parent:0x14006ad65a0)
 (s vals) @(4347) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7ba430,Source:if test<VPBlock(2,0)>.Name == na...,Parent:0x1400b7d83b0)
 (s typs) @(4347) []
          @(4457) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad65a0,Source:for _<VPBlock(0,0)>, test<VPBloc...,Parent:0x14006ad63c0)
            test: (struct{("TestUserPerms" string),(TestUserPerms testing.testingFunc)} testing.InternalTest)
 (s vals) @(4457) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7d83b0,Source:for _<VPBlock(0,0)>, test<VPBloc...,Parent:0x1400b7dac30)
            test: (nil testing.InternalTest)
 (s typs) @(4457) [testing.InternalTest]
          @(4625) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad63c0,Source:func runtest(name (const-type st...,Parent:0x1400c488d20)
            name: ("TestUserPerms" string)
            report: ( string)
 (s vals) @(4625) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7dac30,Source:func runtest(name (const-type st...,Parent:0x1400b8a7830)
            name: ( string)
            report: ( string)
 (s typs) @(4625) [string string]
    Blocks (other):
          #11 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b860,Source:if perm<VPBlock(3,0)>.Equal(exis...,Parent:0x1400393b680)
 (static) #11 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000138d30,Source:if perm<VPBlock(3,0)>.Equal(exis...,Parent:0x14000368e30)
          #10 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b680,Source:for i<VPBlock(1,0)>, existingPer...,Parent:0x1400393b4a0)
            i: (0 int)
            existingPerm: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (static) #10 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000368e30,Source:for i<VPBlock(1,0)>, existingPer...,Parent:0x140003691b0)
            i: (0 int)
            existingPerm: (nil gno.land/p/demo/acl.perm)
          #9 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393b4a0,Source:for _<VPBlock(0,0)>, perm<VPBloc...,Parent:0x1400393a780)
            perm: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (static) #9 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140003691b0,Source:for _<VPBlock(0,0)>, perm<VPBloc...,Parent:0x14000134c30)
            perm: (nil gno.land/p/demo/acl.perm)
          #8 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393a780,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14008b44960)
            d: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
            bucket: ("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string)
            p: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] []gno.land/p/demo/acl.perm)
            existing: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms)
            ok: (true bool)
            ps: (slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms)
 (static) #8 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000134c30,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14000148330)
            d: (nil *gno.land/p/demo/acl.Directory)
            bucket: ( string)
            p: (nil []gno.land/p/demo/acl.perm)
            existing: (undefined)
            ok: (false bool)
            ps: (nil gno.land/p/demo/acl.perms)
          #7 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400393a3c0,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14008b44960)
            d: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
            addr: ("g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" std.Address)
            verb: ("write" string)
            resource: ("r/demo/boards:gnolang/2" string)
            bucket: ("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string)
            p: (struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)
 (static) #7 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000135030,Source:func (d *(Directory<VPBlock(2,1)...,Parent:0x14000148330)
            d: (nil *gno.land/p/demo/acl.Directory)
            addr: ( std.Address)
            verb: ( string)
            resource: ( string)
            bucket: ( string)
            p: (nil gno.land/p/demo/acl.perm)
          #6 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad7a40,Source:func TestUserPerms(t *(testing<V...,Parent:0x1400c45c3c0)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            adm: ("g1v9jx66twta047h6lta047h6lta047h6l8xuxz4" std.Address)
            mod: ("g1d4hkgh6lta047h6lta047h6lta047h6l6g5nfc" std.Address)
            usr: ("g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" std.Address)
            cst: ("g1vd6hxar0d4047h6lta047h6lta047h6lxys8uf" std.Address)
            dir: (&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory)
 (static) #6 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000343030,Source:func TestUserPerms(t *(testing<V...,Parent:0x140004d0630)
            t: (nil *testing.T)
            adm: ( std.Address)
            mod: ( std.Address)
            usr: ( std.Address)
            cst: ( std.Address)
            dir: (nil *gno.land/p/demo/acl.Directory)
          #5 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6f00,Source:func tRunner(t *(T<VPBlock(2,35)...,Parent:0x1400ab09a40)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            fn: (TestUserPerms testing.testingFunc)
            verbose: (true bool)
            start: (1729417102811766000 int64)
 (static) #5 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14008e64830,Source:func tRunner(t *(T<VPBlock(2,35)...,Parent:0x140028ea330)
            t: (nil *testing.T)
            fn: (nil testing.testingFunc)
            verbose: (false bool)
            start: (0 int64)
          #4 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6b40,Source:func RunTest(runFlag (const-type...,Parent:0x1400ab09a40)
            runFlag: ("" string)
            verbose: (true bool)
            test: (struct{("TestUserPerms" string),(TestUserPerms testing.testingFunc)} testing.InternalTest)
            ret: ( string)
            t: (&(struct{("TestUserPerms" string),(false bool),(false bool),(nil []*testing.T),(nil *testing.T),(nil []uint8),(true bool),(undefined),( string)} testing.T) *testing.T)
            report: (undefined)
            out: (undefined)
 (static) #4 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14008e3fc30,Source:func RunTest(runFlag (const-type...,Parent:0x140028ea330)
            runFlag: ( string)
            verbose: (false bool)
            test: (nil testing.InternalTest)
            ret: ( string)
            t: (nil *testing.T)
            report: (nil testing.Report)
            out: (nil gonative{[]uint8})
          #3 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad6960,Source:if test<VPBlock(2,0)>.Name == na...,Parent:0x14006ad65a0)
 (static) #3 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7ba430,Source:if test<VPBlock(2,0)>.Name == na...,Parent:0x1400b7d83b0)
          #2 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad65a0,Source:for _<VPBlock(0,0)>, test<VPBloc...,Parent:0x14006ad63c0)
            test: (struct{("TestUserPerms" string),(TestUserPerms testing.testingFunc)} testing.InternalTest)
 (static) #2 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7d83b0,Source:for _<VPBlock(0,0)>, test<VPBloc...,Parent:0x1400b7dac30)
            test: (nil testing.InternalTest)
          #1 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14006ad63c0,Source:func runtest(name (const-type st...,Parent:0x1400c488d20)
            name: ("TestUserPerms" string)
            report: ( string)
 (static) #1 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x1400b7dac30,Source:func runtest(name (const-type st...,Parent:0x1400b8a7830)
            name: ( string)
            report: ( string)
    Frames:
          #9 [FRAME FUNC:Equal RECV:(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm) (1 args) 23/9/0/14/12 LASTPKG:gno.land/p/demo/acl LASTRLM:Realm(nil)]
          #8 [FRAME LABEL:  20/8/0/13/10]
          #7 [FRAME LABEL:  19/7/0/12/9]
          #6 [FRAME FUNC:removePermsFromBucket RECV:(&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory) (2 args) 17/6/0/10/8 LASTPKG:gno.land/p/demo/acl LASTRLM:Realm(nil)]
          #5 [FRAME FUNC:RemoveUserPerm RECV:(&(struct{(struct{(&(struct{("u:g1w4ek2ujlta047h6lta047h6lta047h6lkvk347" string),(slice[(struct{(slice[("write" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm),(struct{(slice[("read" string)] []string),(slice[("r/demo/boards:gnolang/2" string)] []string)} gno.land/p/demo/acl.perm)] gno.land/p/demo/acl.perms),(0 int8),(1 int),(nil *gno.land/p/demo/avl.Node),(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Node) *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree),(struct{(nil *gno.land/p/demo/avl.Node)} gno.land/p/demo/avl.Tree)} gno.land/p/demo/acl.Directory) *gno.land/p/demo/acl.Directory) (3 args) 14/5/0/8/7 LASTPKG:gno.land/p/demo/acl LASTRLM:Realm(nil)]
          #4 [FRAME FUNC:TestUserPerms RECV:(undefined) (1 args) 11/4/0/6/6 LASTPKG:testing LASTRLM:Realm(nil)]
          #3 [FRAME FUNC:tRunner RECV:(undefined) (3 args) 8/3/0/4/5 LASTPKG:testing LASTRLM:Realm(nil)]
          #2 [FRAME FUNC:RunTest RECV:(undefined) (3 args) 6/2/0/3/4 LASTPKG:gno.land/p/demo/acl LASTRLM:Realm(nil)]
          #1 [FRAME LABEL:  2/1/0/1/2]
          #0 [FRAME FUNC:runtest RECV:(undefined) (1 args) 1/0/0/0/1 LASTPKG:gno.land/p/demo/acl LASTRLM:Realm(nil)]
    Exceptions:

FAIL
FAIL    .       0.86s
FAIL
FAIL
FAIL: 0 build errors, 1 test errors
@0xtekgrinder 0xtekgrinder changed the title Fmt function in testing environment crash the whole function (gnovm): Fmt function in testing environment crash the whole function Oct 20, 2024
@0xtekgrinder 0xtekgrinder changed the title (gnovm): Fmt function in testing environment crash the whole function (gnovm) Fmt function in testing environment crash the whole function Oct 20, 2024
@thehowl
Copy link
Member

thehowl commented Oct 21, 2024

duplicate #1155

@thehowl thehowl closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants