[riot-devel] Another good argument against function macros

Oleg Hahm oliver.hahm at inria.fr
Wed Apr 15 11:03:39 CEST 2015

Dear RIOTers,

I just read about a buffer overflow in X.Org caused by a macro in a header
file [1]. While the bug was fixed in 2013 it still may cause bugs in other
software that uses this macro and has not been recompiled.

If we envision that single libraries may be updated in future IoT scenarios, I
think this incident indicates yet another good argument against (non-trivial)
function macros.


[1] http://lists.x.org/archives/xorg-announce/2015-April/002561.html
printk(KERN_ERR "msp3400: chip reset failed, penguin on i2c bus?\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20150415/632adc0e/attachment.sig>

More information about the devel mailing list