Skip to content

Commit

Permalink
Merge pull request iovisor#1151 from goldshtn/usdt-workaround
Browse files Browse the repository at this point in the history
cc: Work around verifier error when reading USDT probe arguments
  • Loading branch information
4ast authored May 3, 2017
2 parents 879bff2 + 2070a2a commit dcf2344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cc/usdt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ bool Probe::usdt_getarg(std::ostream &stream) {

for (size_t arg_n = 0; arg_n < arg_count; ++arg_n) {
std::string ctype = largest_arg_type(arg_n);
std::string cptr = tfm::format("*((%s *)dest)", ctype);
std::string cptr = tfm::format("*((volatile %s *)dest)", ctype);

tfm::format(stream,
"static inline int _bpf_readarg_%s_%d("
"static __always_inline int _bpf_readarg_%s_%d("
"struct pt_regs *ctx, void *dest, size_t len) {\n"
" if (len != sizeof(%s)) return -1;\n",
attached_to_.value(), arg_n + 1, ctype);
Expand Down

0 comments on commit dcf2344

Please sign in to comment.