Skip to content

Commit 644fcab

Browse files
committed
fix #819: crash with byval arg which gains new attributes
1 parent b0402f2 commit 644fcab

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ir/value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ StateValue Input::mkInput(State &s, const Type &ty, unsigned child) const {
210210
if (hasAttribute(ParamAttrs::ByVal)) {
211211
unsigned bid;
212212
expr size = expr::mkUInt(attrs.blockSize, bits_size_t);
213-
val = get_global(s, getName(), size, attrs.align, false, bid);
213+
val = get_global(s, smt_name, size, attrs.align, false, bid);
214214
s.getMemory().markByVal(bid);
215215
} else {
216216
auto name = getSMTName(child);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
define void @src(ptr byval(i8) %a) {
2+
ret void
3+
}
4+
5+
define void @tgt(ptr readnone byval(i8) %a) {
6+
ret void
7+
}

0 commit comments

Comments
 (0)