aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-04-15 12:36:25 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-15 13:23:33 +0000
commitf887b0490140a0c80dd49d2c549ac57ac2adc2b9 (patch)
tree1517fcc39031508f1701bee8ef4078968c1fbde2 /executor
parent80ce88419762e4342971463033802fea7cdb2973 (diff)
prog: don't pad data in exec encoding
With leb128 ints it does not make any sense. Reduces exec sizes a bit more: - exec sizes: 10%:597 50%:1438 90%:7145 + exec sizes: 10%:584 50%:1423 90%:7076
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 84a8e0d43..ba2fb4bff 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -782,11 +782,10 @@ void execute_one()
case arg_data: {
uint64 size = read_input(&input_pos);
size &= ~(1ull << 63); // readable flag
- uint64 padded = (size + 7) & ~7;
- if (input_pos + padded > input_data + kMaxInput)
+ if (input_pos + size > input_data + kMaxInput)
fail("data arg overflow");
NONFAILING(memcpy(addr, input_pos, size));
- input_pos += padded;
+ input_pos += size;
break;
}
case arg_csum: {