This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common] Define internal_usleep on Solaris
ClosedPublic

Authored by ro on Jul 13 2021, 1:22 AM.

Details

Summary

The Solaris/amd64 buildbot has recently been broken several times, at least one of those
remains unfixed:

[63/446] Generating Sanitizer-x86_64-Test
[...]
Undefined			first referenced
 symbol  			    in file
_ZN11__sanitizer15internal_usleepEy /opt/llvm-buildbot/home/solaris11-amd64/clang-solaris11-amd64/stage1/projects/compiler-rt/lib/sanitizer_common/tests/libRTSanitizerCommon.test.x86_64.a(sanitizer_common.cpp.o)
ld: fatal: symbol referencing errors

Thist patch fixes it by defining the missing internal_usleep.

Tested on amd64-pc-solaris2.11.

Diff Detail

Event Timeline

ro created this revision.Jul 13 2021, 1:22 AM
ro requested review of this revision.Jul 13 2021, 1:22 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptJul 13 2021, 1:22 AM
dvyukov accepted this revision.Jul 13 2021, 1:29 AM

Thanks for fixing this rather than reverting my commit :)

You can do:
nanosleep(&ts, nullptr);
Passing in the second pointer is something I forgot to cleanup in my change.
But otherwise looks good to me.

This revision is now accepted and ready to land.Jul 13 2021, 1:29 AM
ro updated this revision to Diff 358200.Jul 13 2021, 2:10 AM

Ignore remaining time from nanosleep.

ro added a comment.Jul 13 2021, 2:12 AM

Thanks for fixing this rather than reverting my commit :)

Sure: I prefer that if it's easy as in this case.

You can do:
nanosleep(&ts, nullptr);
Passing in the second pointer is something I forgot to cleanup in my change.

Makes sense and passed a quick retest as expected.

But otherwise looks good to me.

Thanks.

This revision was landed with ongoing or failed builds.Jul 13 2021, 2:15 AM
This revision was automatically updated to reflect the committed changes.