News for hackers. Stuff that matters.
Re:Porting systemd to musl Libc-powered Linux by awilfox on Thursday September 05, 2024 @07:59PM (#41461502)
That would be amazing, but I don't imagine that malloc internal probes would be readily accepted to musl even if they were improved. One of the things musl admits is the ability to swap allocators around; you can just LD_PRELOAD a new one. Or even, with Chimera, replace the stock one too! Having internal debug probes would mean every allocator you want to use would need to provide those same APIs, and I don't find that particularly reasonable.
Re:Porting systemd to musl Libc-powered Linux by SubjectToChange on Friday September 06, 2024 @03:47AM (#41463920)
How is musl special when it comes to interposing malloc? As far as I’m aware, (dynamically) swapping out malloc implementations is a messy business no matter what. Most libc implementations only “support” the behavior in the sense that they won’t stop users from “swimming in the deep end”, so to speak.
Re:Porting systemd to musl Libc-powered Linux by q66 on Friday September 06, 2024 @11:06AM (#41466883)
chimera does not interpose malloc, we outright patch it out inside musl, so not really something musl would support
Re:Porting systemd to musl Libc-powered Linux by blucaz on Monday September 09, 2024 @05:01AM (#41486674)
malloc_info() is not consumed internally but it is only wired up as a debugging utility via systemd-analyze, which is sorely needed when things go bad in strange and weird ways. It would be entirely fine for a libc to just implement a stub that returns a fixed string:

<malloc version="0">Not implemented</malloc>

or so.