• Improving GCC Buffer Overflow Detection for C Flexible Array Members (O

    From LWN.net@86:200/23 to All on Mon Nov 24 06:40:07 2025
    The Oracle blog has a
    lengthy article on enhancements to GCC to help detect overflows of
    flexible array members (FAMs) in C programs.

    We describe here two new GNU extensions which specify size
    information for FAMs. These are a new attribute,
    "counted_by" and a new builtin function,
    "__builtin_counted_by_ref". Both extensions can be used in
    GNU C applications to specify size information for FAMs, improving
    the buffer overflow detection for FAMs in general.

    This work has been covered on LWN as well.

    https://lwn.net/Articles/1047547/
    --- SBBSecho 3.32-Linux
    * Origin: Palantir * palantirbbs.ddns.net * Pensacola, FL * (86:200/23)