Hi Lluís! Lluís Batlle i Rossell <vi...@viric.name> skribis:
> running the test below, I see on glibc-2.17 armv5tel-linux: > ---- > Running net-db.test > > ;;; (err -11) > unexpected error code: -11 "System error" > FAIL: net-db.test: getaddrinfo: no name > ---- Does it happen in a chroot without /etc/resolv.conf & co.? Is it a dynamically-linked binary? Could you run “strace -o log -f ./check-guile net-db.test” and post the log? (Note that I build it with Guix on x86_64-linux-gnu without any problems; glibc 2.17 as well, and in a chroot.) Now, we have a problem with the ‘getaddrinfo-error’ API: EAI_SYSTEM means “check what errno says”, and we don’t provide the errno value. This could be fixed by passing the errno as an additional parameter to ‘throw’. However, that would lead to wrong-num-args for existing handlers upon EAI_SYSTEM, and would essentially force programmers to use ‘case-lambda’ for their handlers. OTOH, there are only two occurrences of EAI_SYSTEM in inet/getaddrinfo.c in glibc: one is for NETDB_INTERNAL, and the other is for IDNA_DLOPEN_ERROR. When that happens, the extra bit of information provided by errno is probably not very helpful. Thoughts? Ludo’.