Closed jovanbulck closed 11 months ago
@jethrogb friendly ping if this small fix can be reviewed and merged?
The sgxs: Update link to format specification commit is unrelated. Can you create a separate PR for that?
rebased and created a separate PR for the documentation link
bors r+
Build succeeded!
The publicly hosted instance of bors-ng is deprecated and will go away soon.
If you want to self-host your own instance, instructions are here. For more help, visit the forum.
If you want to switch to GitHub's built-in merge queue, visit their help page.
Replace the use of
stdout().write(&data)
withstdout().write_all(&data)
to always ensure complete data writes.The original code would silently continue even after the data buffer was only partially written, producing incomplete and buggy SGXS memory dumps in practice.
See also:
Example of buggy behavior
This can be easily observed, e.g., as follows already in the 2nd page of an EDP-generated SGXS:
Before the fix in this PR the executable page is not entirely copied into the memory dump (the last 1446 bytes are silently skipped and are filled in by the next call to
stdout().write(&data)
from the next page):After the fix in this PR the page is indeed properly copied into the memory dump: