Created attachment 363[details]
patch that fixes the problem
Segmentation fault happens (and the server exits) on encountering duplicate static local zone configuration.
The root cause is the code around line 190 in localzone.c, where the local_zone_delete(z) also deallocates the nm string, which is subsequently used to find the existing zone with the same name (this all happens upon detecting a duplicate). I think that this kind of sequence may sometimes work and sometimes not.
unbound-checkconf also sagfaults at the same location, for such a configuration.
I'm attaching a potential patch for your review.
This problem was observed on the most recent trunk code.
Here's a minimized configuration that can be used to reproduce this problem.
----8<-------------------------
server:
interface: 0.0.0.0
interface: ::0
access-control: 0.0.0.0/0 allow
define-tag: "spam"
access-control-tag: 10.11.12.13/32 "spam"
local-zone: "mostlyham.com" static
local-zone: "mostlyham.com" static
local-zone-tag: "mostlyham.com" "spam"
access-control-tag-action: 10.11.12.13/32 spam refuse
logfile: ""
username: ""
---->8-------------------------