[syslinux] [PATCH 2/2] core: Fix stack overflow when reloading config

H. Peter Anvin hpa at zytor.com
Mon Feb 1 02:14:20 PST 2016


On 01/26/16 07:36, Celelibi via Syslinux wrote:
> 
> From what I've seen, I think there are memory leaks a bit everywhere.
> And it's practically unavoidable since modules are always forcefully
> unloaded instead of letting them gracefully terminate.
> 
> Then, as I already mentioned somewhere else, I think we would need a
> global resource tracker so that when a module is unloaded (or
> simili-unloaded if it stays in memory anyway as discussed above) its
> allocated resources (memory, opened files etc) can be freed anyway.
> 
> That would, of course, not work for the resources allocated by the
> core module, but that could help tracking the growth of the allocated
> resource and thus help debug them.
> 

We actually *have* a resource tracker; the malloc() implementation is
explicitly designed so it keeps track of the owner module in order to be
able to purge the contents on module exit.  We would still do that, just
as now, the only difference is that we wouldn't purge the readonly
segment(s) of a module nor the backup copy of the read-write segment(s).

	-hpa




More information about the Syslinux mailing list