Skip to content

Commit

Permalink
fix crash with tail calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Oct 17, 2024
1 parent e3ad4db commit e376bfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ir/attrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ void TailCallInfo::check(State &s, const Instr &i,
for (const auto &arg : args) {
Pointer ptr(s.getMemory(), arg.val.value);
s.addUB(arg.val.non_poison.implies(
(ptr.isStackAllocated() || ptr.isByval()).implies(arg.byval) &&
(ptr.isStackAllocated() || ptr.isByval()).implies(arg.byval != 0) &&
true // TODO: check for !var_args
));
}
Expand Down
2 changes: 1 addition & 1 deletion ir/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace IR {
struct PtrInput {
unsigned idx = 0;
StateValue val;
smt::expr byval = false;
smt::expr byval = smt::expr::mkUInt(0, 1);
smt::expr noread = false;
smt::expr nowrite = false;
smt::expr nocapture = false;
Expand Down

0 comments on commit e376bfc

Please sign in to comment.