This is an archive of the discontinued LLVM Phabricator instance.

[msan] Put send/recvmmsg behind check for mmsghdr
AbandonedPublic

Authored by mcrosier on Jan 15 2018, 6:52 AM.

Details

Summary

Internally, we started running into a build failure after r321774 with the following error: "use of undeclared identifier 'mmsghdr'." The underlying issue is that we have machines that are using an older version of glibc, glibc 2.11.3, which don't define mssghdr. I would love to upgrade these machines, but unfortunately that's currently not an option.

This patch just checks for the mmsghdr feature prior to trying to intercept sendmmsg/recvmmsg. Feedback is very much welcome as this is not my area of expertise.

Diff Detail

Event Timeline

mcrosier created this revision.Jan 15 2018, 6:52 AM

2.11.3 has been released in 2010, do we support so old releases?

2.11.3 has been released in 2010, do we support so old releases?

Yes, we know.. :( Despite our best efforts, my team and I have not been able to get these machines upgraded (i.e., it's not in our control).

2.11.0 released in 2006. We were already rejecting old Linux patches in LLVM projects as they were adding similar switches, as nobody would really maintain them.

vitalybuka added inline comments.Jan 17 2018, 2:42 PM
lib/sanitizer_common/CMakeLists.txt
184

is any existing test fails on linux if you comment: add_definitions(-DCOMPILER_RT_HAS_mmsghdr) ?

vitalybuka added inline comments.Jan 17 2018, 2:51 PM
lib/sanitizer_common/sanitizer_platform_limits_posix.cc
1029

please clang-format this. long line will fail lint check

vitalybuka added inline comments.Jan 17 2018, 2:57 PM
lib/sanitizer_common/CMakeLists.txt
184

I tried, it fails. So I am OK with this patch if we have the test covering supported case.

vitalybuka requested changes to this revision.Jan 17 2018, 3:15 PM

Actually check-msan fails even with patch as is

This revision now requires changes to proceed.Jan 17 2018, 3:15 PM
mcrosier abandoned this revision.Jan 18 2018, 12:15 PM

I think we've identified a work around internally, so I'm just going to abandon this patch.