[PATCH 2/2] stdlib: Re-implement free (environ) compatibility kludge for setenv

Florian Weimer fweimer@redhat.com
Fri Jan 24 21:35:32 GMT 2025


* Andreas K. Huettel:

> That said, we're reaching the point now where additional fix-ups are
> very late.
>
> * Has the adressed problem been observed anywhere else *except* 
>   userhelper?

Not to my knowledge.  The original change (not this week's attempt at
improvement) has been in Fedora for about a month, without any reported
side effects.

> * Any other ideas to estimate possible impact?

I don't think usermode and userhelper are widely used, except that it is
a dependency of subscription-manager (which is itself quite specific to
Red Hat, even on Fedora, it's rarely used).

I'm not aware of any other breakage.  Most of the dodgy code I found is
broken with the old realloc implementation, too.  Whether it crashes
with the old implementation depends on heap layout details (e.g., does
realloc have to move pointers? and stuff like that).  The usermode case
is unusual that it it's quite reliable with the old implementation (and
after this patch here, with the new one, too).

> * In case this has no wider impact, would you be OK with backporting the
>   fix after the release?

We could commit it after the 2.41 release, not backport it, and revert
it close to the 2.42 release if it is not needed after all.  But then,
it's only a very slight inefficiency, and if it spares someone an
extensive investigation after the update to 2.41, having it in the
release would be nice.

I think it's quite safe, the main risk is that I botched the size
calculations.  But they are simpler than before, so that risk is quite
small.  And Carlos reviewed those changes, too.

Thanks,
Florian



More information about the Libc-alpha mailing list