This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common][test] Handle missing REG_STARTEND in Posix/regex_startend.cpp
ClosedPublic

Authored by ro on Mar 11 2021, 7:03 AM.

Details

Summary

As reported in D96348, the Posix/regex_startend.cpp test FAILs on Solaris because
REG_STARTEND isn't defined. It's a BSD extension not present everywhere. E.g. AIX doesn't have it, too.

Fixed by wrapping the test in #ifdef REG_STARTEND.

Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.

Diff Detail

Event Timeline

ro created this revision.Mar 11 2021, 7:03 AM
ro requested review of this revision.Mar 11 2021, 7:03 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptMar 11 2021, 7:03 AM
arichardson accepted this revision.Mar 11 2021, 7:14 AM

Thanks, this looks good to me, but maybe wait until one of the sanitizer maintainers has had a look before committing.

This revision is now accepted and ready to land.Mar 11 2021, 7:14 AM