Finalizers were replaced with cleanups in the os package as part of #70907. With that change, we discovered that a shallow copy of os.Root caused errors (#74574). CL 638555 will be reverted for the 1.25 release. Cleanups will be reintroduced in Go 1.26.

@golang/release @golang/runtime

Comment From: gopherbot

Change https://go.dev/cl/688435 mentions this issue: os: revert the use of AddCleanup to close files and roots