Re: [reSIProcate] Bug in ares
Hi ims3g,
>I wondered it was caused by alignment issue.
>After change line
>memset(newserv + (*nservers * sizeof(struct server_state)), '\0',
>sizeof(struct server_state));
>to
>memset(&newserv[*nservers], '\0', sizeof(struct server_state));
>The coredump seemed gone.
Same here. I inspected the addresses of
newserv + (*nservers * sizeof(struct server_state))
and
newserv[*nservers]
while they are the same for the first nameserver they indeed differ for
the second. So I agree to your assumption that alignment causes the error.
Greetings
Johannes Dohmen