NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
295 stars 99 forks source link

drill and GCC11 #131

Closed stanislavlevin closed 2 years ago

stanislavlevin commented 3 years ago

Recently Fedora34 has been released. This distro switched to GCC11 from GCC10. The drill tool compiled with GCC11 doesn't work as it worked compiled with GCC10.

Sig chasing error:

[root@master1 /]# drill -r ./roots -S -k /etc/trusted-key.key_ dnssec. @127.0.0.1 SOA ;; Number of trusted keys: 1
;; Chasing: dnssec. SOA

DNSSEC Trust tree:
dnssec. (SOA)
|---dnssec. (DNSKEY keytag: 54935 alg: 8 flags: 257)
No trusted keys found in tree: first error was: No DNSSEC public key(s)
;; Chase failed.

drill_fail.log

Build with "-O2 -Wextra -Wstrict-aliasing=1" against develop branch (this project) is attached. build.log

Build with -fno-strict-aliasing fixes the problem:

[root@master1 /]# drill -r ./roots -S -k /etc/trusted-key.key_ dnssec. @127.0.0.1 SOA ;; Number of trusted keys: 1
;; Chasing: dnssec. SOA

DNSSEC Trust tree:
dnssec. (SOA)
|---dnssec. (DNSKEY keytag: 54935 alg: 8 flags: 257)
    |---dnssec. (DS keytag: 54935 digest type: 2)
        |---. (DNSKEY keytag: 46220 alg: 8 flags: 257)
;; Chase successful