Subj : Improving GCC Buffer Overflow Detection for C Flexible Array Members ( To : All From : LWN.net Date : Sun Nov 23 2025 16:15:09 Improving GCC Buffer Overflow Detection for C Flexible Array Members (Oracle) Date: Sun, 23 Nov 2025 16:08:32 +0000 Description: 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. ====================================================================== Link to news story: https://lwn.net/Articles/1047547/ --- Mystic BBS v1.12 A49 (Linux/64) * Origin: tqwNet UK HUB @ hub.uk.erb.pw (1337:1/100) .