Fixing sector_div
Fixing sector_div
Posted May 25, 2015 12:57 UTC (Mon) by jreiser (subscriber, #11027)In reply to: A tale of two data-corruption bugs by cesarb
Parent article: A tale of two data-corruption bugs
Even then, we are not done yet. There must be an audit to detect and evaluate all similar instances: any macro with arguments that is not equivalent to the obvious C-language function of those same arguments. There are valid uses of such macros, but they must be prominently documented because of the high risk of confusion with functions. Among other checks: correct use of parentheses, brackets and braces "()[]{}"; no use of any argument as an lvalue; no use of any identifier which is not in scope at time of definition. Automate the detection phase of the audit using help from your favorite shell, editor and compiler.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
