-
Notifications
You must be signed in to change notification settings - Fork 2k
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
unittests: enable ASAN on native #18099
Conversation
Previous value tripped ASAN. Increase to sth with room to spare.
@@ -48,8 +48,7 @@ | |||
} \ | |||
} while (0) | |||
|
|||
#define VEC_MSG_LEN (sizeof("Unexpected userinfo member \"\" for \"\"") + \ | |||
64U + 8U) | |||
#define VEC_MSG_LEN (256) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was like ~110 before. tests are executed pretty low on the stack, so this should be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell which test exactly tripped the asan? The original VEC_MSG_LEN
might be based on a wrong assumption, which in testing is always a warning sign.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(so I'd rather fix the value for the correct assumption than just making it large enough, to account for exactly those kind of wrong assumptions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... Just saw, that this is just for the output messages of the assert... so nvm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jup, my debugging went the same way, but it was actually the first test (so first message) where it tripped. Then I tried to parse the macro for why this fails, but that was not very fruitful.
(unrelated build failure in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. ACK
Contribution description
This PR wires up the Address Sanitizer for the unittests on native.
Another
PRcommit fixes the last remaining issue ASAN reported (a scratch buffer was too small in tests-uri_parser).Testing procedure
This only affects native, and makes it running unittests more likely to fail. CI tests all of it.
Issues/PRs references
#17800