Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.6 #79

Merged
merged 119 commits into from
Jun 21, 2021
Merged

Release 1.6 #79

merged 119 commits into from
Jun 21, 2021

Conversation

ahueck
Copy link
Contributor

@ahueck ahueck commented Jun 18, 2021

OpenMP and array cookie support.

Passes

Runtime

Misc general

sebastiankreutzer and others added 30 commits January 18, 2021 14:13
* Restructure runtime lib, separate alloc map and type info check
* Remove singletons, pass references to new classes if possible

Co-authored-by: Alexander Hück <[email protected]>
ahueck and others added 27 commits April 14, 2021 14:37
- This handles undefined (TypeART) behavior for unknown types, see e.g., #62
- Libc++-based build with lit-test-suite works now, see #60
- Extended testing using sanitizers and different TypeART configurations
openmp support, see #10 
- Passes: Handle OpenMP codegen in LLVM IR
- Runtime: (optional) thread-safety
- Add extended testing/CI
- Test thread-safety (with sanitizers)
- Various bug fixes/improvements: #67, #65, #63, #60, #58
Instead of collecting all bitcasts and filtering them, we observe that
in case a GEP instruction is applied to an allocation it usually is used
to calculate the pointer of the actual array.
In case two GEP instructions are present, the first is used to add
necessary padding to the array cookie and it's bitcast instructions can
be safely ignored.
Introduces a new data structure for array cookie information that stores the
store instruction that writes to the cookie and the value of the padding
passed to the GEP instruction that computes the array pointer passed to the
user.

This commit also introduces several asserts to catch cases which are not
expected and should be further investigated.
* Apply/run scripts are part of install target, closes #70
* Refactoring: extract plugin args to variables; double quote usage reduced
This makes these two command line arguments available in both
the MemInstFinderPass and TypeARTPass. This allows the
MemInstFinder to only collect the necessary instructions. As
heap allocations are only collected on unoptimized code this
in turn allows for a stricter analysis of the given code.

To share the command line arguments, the cl::opt instances
have been shared between the two passes. As the TypeARTPass
depends on the MemInstFinderPass to already be loaded, the
instances have been moved to the MemInstFinderPass and are
now referenced with external linkage in the TypeARTPass.
If an array cookie is present, the value of the arrary cookie
store instruction will be used as the element count of the array.
In case of array cookies, TypeART previously instrumented the
address of the full memory block including the cookie. With this
commit this is changed s.t. the memory address of the actual
array is instrumented.
When ASAN is enabled, it will track array cookies using instrumentation
by passing the array cookie-related bitcast.
This triggered an assert of TypeART in "expectSingleUser", as we
expected only a single user of the bitcast (the store of the array
length)
This patch explicitly handles the ASAN cookie instrumentation.
use llvm's Expected type to handle errors using some macros
that simplify control flow
* Add cstddef header for RuntimeData to explicitly pull size_t
* Handle potential noalias in Clang codegen w.r.t. *new* expression
* return_error_if merged to always use formatv version
* typeart::error namespace lowercase
* some minor code format
array cookie support for (de-)allocations with *new[]* and *delete[]*:
* Detect cookies based on GEP use to set the cookie.
* Note: MemInstFinderPass now defines the flags for heap/stack mode instead of TypeARTPass. This avoids running heap detection on optimized codes (unsupported), which may introduce severals GEPs that make cookie detection misbehave.
* Set CMake version to 1.6
* Fix initial demo related issues (Makefile, deprecated MPI symbols)
* Rework README.md
@coveralls
Copy link
Collaborator

coveralls commented Jun 18, 2021

Pull Request Test Coverage Report for Build 950369259

  • 1060 of 1156 (91.7%) changed or added relevant lines in 30 files are covered.
  • 28 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+1.7%) to 89.437%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/passes/filter/FilterUtil.h 31 32 96.88%
lib/passes/filter/StdForwardFilter.cpp 12 13 92.31%
lib/passes/support/OmpUtil.h 7 8 87.5%
lib/passes/instrumentation/TypeARTFunctions.cpp 10 12 83.33%
lib/passes/support/Error.h 0 2 0.0%
lib/passes/instrumentation/MemOpArgCollector.cpp 14 17 82.35%
lib/passes/filter/CGForwardFilter.cpp 13 17 76.47%
lib/passes/support/DefUseChain.h 46 50 92.0%
lib/passes/analysis/MemOpVisitor.cpp 83 88 94.32%
lib/passes/filter/IRPath.h 9 26 34.62%
Files with Coverage Reduction New Missed Lines %
lib/passes/analysis/MemInstFinderPass.cpp 1 87.75%
lib/passes/analysis/MemOpVisitor.cpp 1 95.95%
lib/passes/filter/CGForwardFilter.cpp 1 72.34%
lib/passes/filter/FilterBase.h 1 94.96%
lib/passes/filter/StandardFilter.cpp 1 92.24%
lib/passes/filter/StdForwardFilter.cpp 1 85.71%
lib/runtime/Runtime.cpp 1 94.44%
lib/passes/filter/FilterUtil.cpp 3 65.79%
lib/support/MPILogger.cpp 18 25.81%
Totals Coverage Status
Change from base Build 461417686: 1.7%
Covered Lines: 2921
Relevant Lines: 3266

💛 - Coveralls

@ahueck ahueck marked this pull request as ready for review June 21, 2021 09:02
@ahueck ahueck merged commit e563d3d into master Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: no member named '_Link_type' in std::map<K,V>::iterator
4 participants