User: Password:
|
|
Subscribe / Log in / New account

Implications of pure and constant functions

Implications of pure and constant functions

Posted Jun 12, 2008 20:04 UTC (Thu) by mtorni (guest, #3618)
Parent article: Implications of pure and constant functions

Are there any security implications of labeling a function pure or constant? Can a malicious user introduce a security bug by checking in a change which changes a function to const? Say ssl_verify_certificate() or sasl_authenticate()? Both are fictitious functions.


(Log in to post comments)

Implications of pure and constant functions

Posted Jun 12, 2008 20:38 UTC (Thu) by quotemstr (subscriber, #45331) [Link]

The key here is "check in". If somebody can check a change in, he can wreak all sorts of
havoc, much of it even more subtle than function attribute changes.

Besides, using function attributes like this to be a sort of post-benchmarking magic that
undergoes strict code review.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds