Don't substract 1 from end_addr in line program writing (#2174)

* Don't substract 1 from end_addr in line program writing

Fixes #2173

* add testcase for end_sequence having offset past retq (#1)

* Update tests/all/debug/translate.rs

Co-authored-by: Gabor Greif <ggreif@gmail.com>

Co-authored-by: Gabor Greif <ggreif@gmail.com>
This commit is contained in:
bjorn3
2020-09-07 15:41:44 +02:00
committed by GitHub
parent 48fab12142
commit ba9908dd0f
2 changed files with 40 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ where
}
}
}
let end_addr = (map.offset + map.len - 1) as u64;
let end_addr = (map.offset + map.len) as u64;
out_program.end_sequence(end_addr);
}
Ok((out_program, offset, files, file_index_base))