This is an archive of the discontinued LLVM Phabricator instance.

[ubsan-minimal] Add a path for non-POSIX (and bare-metal) use of the library
ClosedPublic

Authored by filcab on Nov 8 2017, 4:12 AM.

Details

Summary

Hook on -DKERNEL_USE (which is also used in lib/builtins) to not import
strlen and not rely on write() being implemented with the stderr on fd 2.

With this, the only requirements to use this library are:

  • "Good enough" std::atomic<void*> and std::atomic<int>
  • abort() being implemented
  • ubsan_message(const char*) being implemented

Diff Detail

Repository
rL LLVM

Event Timeline

filcab created this revision.Nov 8 2017, 4:12 AM
eugenis accepted this revision.Nov 8 2017, 12:43 PM
This revision is now accepted and ready to land.Nov 8 2017, 12:43 PM
This revision was automatically updated to reflect the committed changes.