open(O_RDONLY | O_TRUNC)[…]
What these flags specified together do is “undefined” in POSIX, but the Linux manpages ominously state “On many systems the file is actually truncated”, and indeed on Linux, using this open mode actually truncates files most of the time!
— Haiku Activity & Contract Report, December 2024 (ft. Iceweasel)
Holy shit, that sounds really bad.