Login
You're viewing the felin.social public feed.
  • Oct 22, 2026, 7:34 PM

    @pitiK3U @thephd OP has been trying to add "defer" to C, which is a mechanism for performing cleanup when leaving a scope (similar to "RAII" in languages like C++)

    this would've been very useful for the current PHP issues, because the current vulnerabilities involve incorrectly cleaning up memory when aborting a request

    💬 1🔄 0⭐ 2

Replies

  • Oct 22, 2026, 7:53 PM

    @r @thephd
    Oh, thanks! I have read about the defer before (and I know about RAII), but wasn't sure if there is something else.

    I haven't read the php thing fully yet. It seems like I should give it a bit of a look.
    Thanks again!

    💬 1🔄 0⭐ 0
  • Oct 22, 2026, 8:26 PM

    @pitiK3U @r the first paper for a defer-like feature was around 2006/2007. It is 2026.

    Resource management has been a huge problem in C for decades, even before that. We have been warned repeatedly that certain language constructs and paradigms are lacking, and we told them the standard is fine, we just need more linters and checkers and analyzers.

    I think we are past the event horizon for these problems now, and have been for quite some time.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0