diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 12:36:25 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 13:23:33 +0000 |
| commit | f887b0490140a0c80dd49d2c549ac57ac2adc2b9 (patch) | |
| tree | 1517fcc39031508f1701bee8ef4078968c1fbde2 /executor/executor.cc | |
| parent | 80ce88419762e4342971463033802fea7cdb2973 (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/executor.cc')
| -rw-r--r-- | executor/executor.cc | 5 |
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: { |
