ModularM
Modular16mo ago
aurelian

Segfault when `Tuple.get()` rebinds

fn cmd_unchecked(args: Tuple) raises -> UnixSocket:
    buf = List[Byte](capacity=128)
    buf.size = 4

    @parameter
    for i in range(__type_of(args).__len__()):
        arg = args.get[i, StringSlice[__origin_of(args)]]() # segfault here
    ...

I passed a custom struct by accident and found this. I'm probably not supposed to be doing this, heads up just in case.
Was this page helpful?