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

Fix false positive for string initialization in header with initterm in callstack #63

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

Conversation

mattdurak
Copy link

@mattdurak mattdurak commented Jan 31, 2019

This fixes false positives if a c++ string is initialized in a header. Currently, VLD is not ignoring the call stack in this case, though it has the "initterm" function in the call stack.

This change adds a check for "initterm" to CallStack::isCrtStartupFunction.

There is also a very basic test added to demonstrate the issue. It does not use GTEST in order to avoid false positives from the test suite init code.

Tested in VS 2017

Fixes #62

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

Successfully merging this pull request may close these issues.

False positive for std::string initialized in header
1 participant