Article 71P23 Improving GCC Buffer Overflow Detection for C Flexible Array Members (Oracle)

Improving GCC Buffer Overflow Detection for C Flexible Array Members (Oracle)

by
corbet
from LWN.net on (#71P23)
The Oracle blog has alengthy article on enhancements to GCC to help detect overflows offlexible array members (FAMs) in C programs.

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

This work has been covered on LWN as well.

External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments