On 12/04/2009 05:11 PM, Owen Rudge wrote:
dlls/imagehlp/tests/integrity.c | 68 +++++++++++++++++++++++++++++++-------- 1 files changed, 54 insertions(+), 14 deletions(-)
Hi Owen,
This test fails on Win95 but only because the size of the dll is not aligned on a 16byte boundary.
Using a different dll on XP for this test (my XP box has 36,921 for imeshare.dll for example) also throws up an error.
Would something like this be ok:
file_size_orig = get_file_size(); + if (file_size_orig % 16 != 0) + { + trace("We need to adjust the file size\n"); + file_size_orig = ((file_size_orig / 16) + 1) * 16; + }
Does anybody know if '16' is indeed the alignment needed?
Hi Paul,
Would something like this be ok:
file_size_orig = get_file_size();
- if (file_size_orig % 16 != 0)
- {
- trace("We need to adjust the file size\n");
- file_size_orig = ((file_size_orig / 16) + 1) * 16;
- }
Does anybody know if '16' is indeed the alignment needed?
The ImageHlp routines pad out to an 8-byte boundary, rather than 16 bytes. I guess as long as we're testing a DLL that we don't control, this step may well be necessary.
Cheers,
On 12/22/2009 05:13 PM, Owen Rudge wrote:
Hi Paul,
Would something like this be ok:
file_size_orig = get_file_size();
- if (file_size_orig % 16 != 0)
- {
- trace("We need to adjust the file size\n");
- file_size_orig = ((file_size_orig / 16) + 1) * 16;
- }
Does anybody know if '16' is indeed the alignment needed?
The ImageHlp routines pad out to an 8-byte boundary, rather than 16 bytes. I guess as long as we're testing a DLL that we don't control, this step may well be necessary.
Cheers,
Ok, I'll create a patch along those lines.
On 12/22/2009 05:13 PM, Owen Rudge wrote:
Hi Paul,
Would something like this be ok:
file_size_orig = get_file_size();
- if (file_size_orig % 16 != 0)
- {
- trace("We need to adjust the file size\n");
- file_size_orig = ((file_size_orig / 16) + 1) * 16;
- }
Does anybody know if '16' is indeed the alignment needed?
The ImageHlp routines pad out to an 8-byte boundary, rather than 16 bytes. I guess as long as we're testing a DLL that we don't control, this step may well be necessary.
Cheers,
Something like the attached?