x_aliases is an array of string, so to calculate its size, it should
be <size-of-array> times <size-of-element>, which should be
sizeof(char*) instead of sizeof(char**).
Details
Details
- Reviewers
cchen15 vitalybuka - Commits
- rG1a8aab6de5de: [sanitizer] use the right type for sizeof
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Would you like to try to update compiler-rt/test/sanitizer_common/TestCases/Linux/netent.cpp ?
I guess check-msan should trigger if you try to print n_aliases
Comment Actions
Hi @vitalybuka, I think compiler-rt/test/sanitizer_common/TestCases/Linux/netent.cpp does not need updates. This patch does not change the functionality since sizeof(char**) == sizeof(char*), it just makes more sence using sizeof(char *) in the calculation of x_aliases's size.
Comment Actions
Thanks, LGTM
and yes, check-msan should NOT trigger trigger as size was not actually changed