[Dnsmasq-discuss] v2.88rc2 segmentation fault with config "local=//" [PATCH]

Petr Menšík pemensik at redhat.com
Fri Nov 25 15:17:21 UTC 2022


Hi!

After reading those changes a bit, it seems there are too many variables 
used in a complex mess. It is very easy to get lost in them, especially 
when sdetails just points somewhere to local function other variables.

I made attempt to reduce the complexity and amount of local variables. 
Instead I moved contents of variables directly into server_details 
structure and added function to just add server from its pointer. Tried 
reducing repetitions by moving similar parts to shared functions.

But I admit I haven't tested the result stays unchanged. It should not 
change any behaviour, just cleanups the code. I think I should finally 
fix more serious runnable tests, which would ensure the functionality 
stayed the same.

What do you think?

Cheers,
Petr

On 11/17/22 20:59, Simon Kelley wrote:
> Thanks for testing these builds. That's a genuine problem.
>
> Fixed in 2.88rc3, in git now.
>
> Cheers,
>
> Simon.
>
>
> On 17/11/2022 18:26, Johnny S. Lee via Dnsmasq-discuss wrote:
>> "local=//" means "Do not forward unqualified names to any upstream
>> servers", right?
>> It has not generated any kind of error until I updated to v2.88rc2.
>> The last build I've been using was built against
>> d3c21c596ef96027429b11216fcdbf65c9434afa
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
-- 
Petr Menšík
Software Engineer, RHEL
Red Hat, https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Reuse-similar-dbus-message-parsing.patch
Type: text/x-patch
Size: 4255 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20221125/d781e253/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Reuse-some-common-parts-of-server-details-parsing.patch
Type: text/x-patch
Size: 18295 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20221125/d781e253/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ensure-pointer-is-always-invalidated-after-freeaddri.patch
Type: text/x-patch
Size: 2043 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20221125/d781e253/attachment-0005.bin>


More information about the Dnsmasq-discuss mailing list