-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]The offset of the RUST STRINGS is misaligned. #925
Comments
Hi @pinksawtooth, thanks for reporting this. I've checked the code on my system, and it seems to be working fine without any offset issues. Additionally, it passes CI tests successfully. Could you please provide the executable you are working with so I can investigate further? Thanks! |
OK |
Ah, I understand now. The reported offset might not be 0x1e520. Please verify the 'Current offset in the input file' as follows: Current offset in the input file (from floss) = Offset (as observed) - Section_RawOffset + Section_VirtualAddress + ImageBase I hope this clarification helps. |
Hey @Arker123 OP provided a lot of detailed information in order for us to reproduce the issue. If there's the possibility that we're reporting some data incorrectly, let's go out of our way reproduce and understand the issue. (OP may not have much extra time so we should minimize the burden on them.) If we can reproduce, please acknowledge here and suggest a fix and/or PR. Otherwise, please explain why the behavior is correct and/or figure out how the output is unintuitive to our users. Sometimes we get so caught up in the implementation that an "outsider" doesn't follow our train of thought. Of course, if you don't have time right now, go ahead and unassigned this issue and I'll grab it after New Years! |
Hey @williballenthin , I appreciate your thorough consideration. I want to clarify that the reported behavior is not a bug; we intentionally designed it to provide the current offset in the input file as output from the beginning. I acknowledge that this may be non-intuitive to users. Considering user expectations, my suggestion is to enhance the output for better user understanding. One approach could be to include this offset in the output. What are your thoughts on this? Open to suggestions. Thanks! |
Please reopen if this is still an issue. |
Description
The offset of the "FLOSS RUST STRINGS" item in "FLOSS" is different from the actual value.
The following is an excerpt of the results of running floss on a Rust program I created.
This time I will focus on this string. (The problem is the same for all strings.)
0x01d720 Hello,
But the actual offset is
0x1e520
as shown in the image below.The other strings are offset by the same amount. Verify with the following string
Add 0xe00 to this offset.
Then the actual offset value will be displayed as follows.
14001e560
I believe it is a bug in Rust Strings because the offset in static strings is normal.
To Reproduce
Run floss with the -v option for the Rust program.
Environment
floss version
Rust version
The text was updated successfully, but these errors were encountered: