This is an archive of the discontinued LLVM Phabricator instance.

[llvm-xsan] Introduce llvm-xsan
Needs ReviewPublic

Authored by delcypher on Oct 6 2020, 5:50 PM.

Details

Summary

llvm-xsan is a tool that contains a set of subtools for working with the
Sanitizers. The goal here is to provide useful tools for working with
the Sanitizers that can be shipped as part of an LLVM toolchain.

This patch includes the following subtools

  • version - Reports the tool version.
  • asan get-schema - A tool to report the schema that describes ASan reports.
  • asan symbolicate - A tool to symbolicate ASan reports.
  • asan parse - A tool to parse ASan reports.

Other tools (e.g. kasan <subtool>, tsan <subtool>, ubsan <subtool>`)
could be added in the future.

Only the version tool contains a full implementation. The other tools
just contain stubs that will be implemented in future patches.

llvm-xsan will not be installed by default but can be installed by
setting the new LLVM_INSTALL_LLVM_XSAN CMake option to ON.

This patch also includes changes to allow testing of llvm-xsan from any
of the compiler-rt test suites. A llvm-xsan-misc test suite has also
been added that tests features that are independent of any particular
sanitizer.

rdar://problem/67436450

Diff Detail

Event Timeline

delcypher created this revision.Oct 6 2020, 5:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2020, 5:50 PM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
delcypher requested review of this revision.Oct 6 2020, 5:50 PM
dmajor added a subscriber: dmajor.Oct 21 2020, 12:47 PM
This comment was removed by vitalybuka.
vitalybuka resigned from this revision.Mar 5 2021, 12:39 PM

I can't see "rdar" content and motivations for these scripts, and I don't expect myself extend my workflow with another layer between me and sanitizers.
As a negative side, if it's committed it will be community responsibility to maintain.
But I have no strong opinion so I am going to resign.

I can't see "rdar" content and motivations for these scripts, and I don't expect myself extend my workflow with another layer between me and sanitizers.
As a negative side, if it's committed it will be community responsibility to maintain.
But I have no strong opinion so I am going to resign.

@vitalybuka Fair enough. Sorry I think you had a question here that's now deleted that I missed. I think it was a question about why this is in compiler-rt and not llvm. The reason for that is because many of the tests will require parsing the output of the Sanitizers which is defined in the runtime. The most convenient place to run binaries built with Sanitizers to parse their output is compiler-rt because we already do that extensively there to test the Sanitizers.

I can't see "rdar" content and motivations for these scripts, and I don't expect myself extend my workflow with another layer between me and sanitizers.
As a negative side, if it's committed it will be community responsibility to maintain.
But I have no strong opinion so I am going to resign.

@vitalybuka Fair enough. Sorry I think you had a question here that's now deleted that I missed. I think it was a question about why this is in compiler-rt and not llvm. The reason for that is because many of the tests will require parsing the output of the Sanitizers which is defined in the runtime. The most convenient place to run binaries built with Sanitizers to parse their output is compiler-rt because we already do that extensively there to test the Sanitizers.

Actually question was "Why this is a part of llvm and not compiler-rt?". But it's already in compiler-rt, so I've deleted the question :)

yln resigned from this revision.Jul 22 2021, 4:23 PM