Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Posted Sep 7, 2023 19:31 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)In reply to: Race-free process creation in the GNU C Library by wtarreau
Parent article: Race-free process creation in the GNU C Library
> Actually you gave a pretty good example, because memory allocations *do* work the same way. If one thread tries to access a memory location while another one is freeing it and without coordinating together, you'll pretty quickly see either a use-after-free bug or a basic segfault.
Now imagine that allocation can be freed at any moment.
> I'm just seeing it as convenience at the expense of extra FDs,
FDs are not a scarce resource.
> which may in some cases result in new classes of bugs such as leaks if some FDs are passed by accident
How is that different from any other FDs?
> or just lost without being closed
Don't lose resources.
> or stuck into a UNIX socket but closed so that nobody sees it
And?