Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe vector access #44

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

schoetbi
Copy link

@schoetbi schoetbi commented Mar 28, 2023

Our users are not always careful when accessing vectors either for reading or even more dangerous for writing values. Therefore, I would like to restrict the accesses to vectors to be within valid bounds.

Since this costs some time to check at runtime I enable this function by defining exprtk_enable_vector_runtime_checks.
When this define is not set, the old (unsecure) behavior is retained.

Runtime penalty:
grafik

Please let me know if I can improve things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant