Don't substract 1 from end_addr in line program writing#2174
Don't substract 1 from end_addr in line program writing#2174yurydelendik merged 3 commits intobytecodealliance:mainfrom
Conversation
|
|
There was a problem hiding this comment.
Let's try that. In the past it was always an issue, e.g. I had the following in the dwarf-to-json library:
Can you check if we have similar case here?
I'm skeptical about test having hardcoded address. We can keep it though for now with note that it relies on cranelift generator, so the address will be changed when generation changes.
| } | ||
| } | ||
| let end_addr = (map.offset + map.len - 1) as u64; | ||
| let end_addr = (map.offset + map.len) as u64; |
There was a problem hiding this comment.
maybe add a comment similar to what we have in the test?
Yeah, right, I was thinking of this too. But it shouldn't be very bad, since
Also the So I suggest to leave it like this for now, and if it causes headaches, just drop it. Better ideas? |
| Ok(()) | ||
| } | ||
|
|
||
| #[allow(dead_code)] |
There was a problem hiding this comment.
This is a copy&pasted function which could be refactored. I didn't do it, because this is test-only code. If somebody objects, I'm happy to fix.
|
Filecheck does have captures: |
That's cool, but I cannot see the ability to do |
Co-authored-by: Gabor Greif <ggreif@gmail.com>
I can't see how that could be. The DWARF5 standard is pretty much unambiguous in its wording (p151):
|
|
Thank you for the patch |
Fixes #2173