burrowers / garble

Obfuscate Go builds
BSD 3-Clause "New" or "Revised" License
3.73k stars 239 forks source link

Build fails in version v.0.12.0 for syscall.Rlimit type #833

Closed mgrosen closed 5 months ago

mgrosen commented 5 months ago

We had a syscall type that was built correctly, but broke with version 12 release, decreasing version to 11 fixed the issue. I know about the caveats, but wanted to raise this in case there is a regression.

error:

# golang.org/x/sys/unix
B5o1Qv.go:1: cannot convert aFwBp5l (variable of type *A3r6a04RolIi) to type *"syscall".Rlimit
iilG0V0BYjNu.go:1: cannot convert jXDdILD (variable of type *A3r6a04RolIi) to type *"syscall".Rlimit
D1i_DB.go:1: cannot convert ggoG1mEZSTvz (variable of type *A3r6a04RolIi) to type *"syscall".Rlimit
exit status 2
exit status 1

code being used

if err := rlimit.RemoveMemlock(); err != nil {
 ...
}

which calls into this function

func RemoveMemlock() error {
    ...
    newLimit := unix.Rlimit{Cur: unix.RLIM_INFINITY, Max: unix.RLIM_INFINITY}
    ...
}
huzpsb commented 5 months ago

Duplicated. See #830