Skip to content

mdns: apply network-probing fix from mdns_listen to mdns_serve - #63

Draft
Blaxar wants to merge 1 commit into
videolabs:masterfrom
Blaxar:mdns-serve-probe-network
Draft

mdns: apply network-probing fix from mdns_listen to mdns_serve#63
Blaxar wants to merge 1 commit into
videolabs:masterfrom
Blaxar:mdns-serve-probe-network

Conversation

@Blaxar

@Blaxar Blaxar commented Aug 10, 2026

Copy link
Copy Markdown

Long story short: alloca was invoked in the main (not returning) loop of mdns_serve, so as long as we don't get out of said loop: nothing gets unwinned (stack memory by default, heap memory if built if -fsplit-stack, at least with gcc on Linux-based systems) and memory is slowly munched away over the lifetime of whatever program relies on this.

As the commit message already hints: there was a similar fix applied to mdns_listen which just consists in having alloca being called into its own function (which will be unwinned for sure), but this was still missing for mdns_serve: #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant