@lina If I remember right, cwd is kept within /proc, and I can imagine getcwd just reading from there (or that file goes and runs getcwd). That said, could always be fs shenanigans.. do you have a suspect in mind?
@lina Correction posted. Please let me know if you'd rather me just delete it; I did see the Asahi Linux post and feel a bit daft for running afoul of it so enthusiastically.
@argv_minus_one Thankfully it wasn't corruption, just breaking invariants that caused getcwd() to break (though I guess under really unlucky circumstances that could cause things like the wrong files to be deleted!)