aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2017-10-16 11:50:46 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-10-16 14:09:52 +0200
commit419e3a859c0e84369b87dfffc174032f5d1b944a (patch)
tree4989c41a72efa54fc111ef84aebad95698818e96 /executor
parent66aeb467de80c92a099e49eaad6c25974c96f9cf (diff)
executor: add PC to kcov_comparison_t
KCOV comparisons support is in the kernel mm tree already, and the patch contains an additional uint64_t to store PCs of functions calling __sanitizer_cov_trace_XXX(). Change kcov_comparison_t accordingly.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/executor/executor.h b/executor/executor.h
index 0eb0e4fc4..94d3a2ca0 100644
--- a/executor/executor.h
+++ b/executor/executor.h
@@ -119,6 +119,7 @@ struct kcov_comparison_t {
uint64_t type;
uint64_t arg1;
uint64_t arg2;
+ uint64_t pc;
// Writes the structure using the write_one function for each field.
// Inspired by write_output() function.
@@ -619,7 +620,7 @@ uint64_t read_input(uint64_t** input_posp, bool peek)
void kcov_comparison_t::write(uint32_t* (*write_one)(uint32_t))
{
- // Write order: type arg1 arg2.
+ // Write order: type arg1 arg2 pc.
write_one((uint32_t)type);
// KCOV converts all arguments of size x first to uintx_t and then to
@@ -657,6 +658,7 @@ void kcov_comparison_t::write(uint32_t* (*write_one)(uint32_t))
bool kcov_comparison_t::operator==(const struct kcov_comparison_t& other) const
{
+ // We don't check for PC equality now, because it is not used.
return type == other.type && arg1 == other.arg1 && arg2 == other.arg2;
}
@@ -666,5 +668,6 @@ bool kcov_comparison_t::operator<(const struct kcov_comparison_t& other) const
return type < other.type;
if (arg1 != other.arg1)
return arg1 < other.arg1;
+ // We don't check for PC equality now, because it is not used.
return arg2 < other.arg2;
}