Skip to content
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

Memory fault test case #1

Open
HosamElfakher opened this issue May 21, 2024 · 1 comment
Open

Memory fault test case #1

HosamElfakher opened this issue May 21, 2024 · 1 comment

Comments

@HosamElfakher
Copy link

HosamElfakher commented May 21, 2024

Hi,
Thank you for sharing this interesting tool. When i tried it, I observed the following.
Looking at this snipped lines of code

  if (addr >= del->SOURCE_SEGMENT_LENGTH) { // scopy
    for (int x = 0; x < siz; x++) {
      del->UPDATED_BUFFER[decode_posi + x] =
          del->UPDATED_BUFFER[addr - del->SOURCE_SEGMENT_LENGTH + x];
    }
  } 

if the address is much greater than the segment, The evaluation of the next lines will be out of buffer boundary.
In other words, the address minus the segment & x must not be greater than the page size.

my best
Hossam

@HosamElfakher
Copy link
Author

update
I tried to debug and see what is the issue so i followed the following:
1- in the while loop of decode_window() function, i printed the calculated address and current decoding position. This update is done on the MCU code and PC code as well.
2- Generate a delta from the PC tool.
3- Reconstruct the image through the PC tool with the additional logs.
4- I sent the delta to the MCU
5- MCU tried to reconstruct the image but it is stuck in memory fault as indicated above.
6- I compare the logs from the PC tool and the MCU. The result is they logs different values.

Note: All files are identical. The file size doesn't exceed 255KB and the generated delta is ~28KB

any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant