1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB (DOSX)
> > dpmild32 doesn't care about the PE "readable" bit (IMAGE_SCN_MEM_READ)
> at all
>
> COOL ... but what does this code do ?
>
> ; PELOAD.ASM
>
> ;*** support for PE-files ***
> ;*** 32-Bit DPMI clients only ***
>
> ?SKIPCOMMENTS equ 1 ;std=1, 1=skip sections not marked as r/w/e
>
> if ?SKIPCOMMENTS
> test byte ptr [edi].IMAGE_SECTION_HEADER.Characteristics+3, 0E0h ;is is
> read/write/exec?
> jz @F ; FAR FAR FAR below
> endif
> ;-------------------------------------------- section size into ecx
> call getsectionsize
>
> shr ecx, 2
> push edi
> mov edi,[edi].IMAGE_SECTION_HEADER.VirtualAddress
> lea edi,[edi + esi - sizeof MZHDR]
> mov edx,edi
> xor eax, eax
> rep stos dword ptr [edi]
> pop edi
>
> Maybe it skips my evil non-readable section ?
Yes.
> IMHO the "?SKIPCOMMENTS" "feature" should get deleted, or moved after the
> clearing at least.
Or just set this boring "readable" bit in your app ...
> One more good idea would be in DPMILD32 to check the page block fixup
> sizes for:
> - >=8
> and
> - divisibility by 4
> Because a value <8 or not divisible by 4 is obviously evil ->
> whine ("Can't load, fixups broken" or so) -> file is missbrewed,
> misslinked, corrupted, crosslinked, etc. BTW, the "PE" thingie has the
> very same bug: it crashes if the size is ZERO
Ok, might be considered...
> This actually brings us to the next severe bug: memory clearing.
> DKRNL seems to correctly clear all allocated memory, also DPMILD32 clears
> __some__ sections (see above), however, besides sections affected by the
> "?SKIPCOMMENTS" "feature", it doesn't clear the stack, while Windaube
> seems to do this job - "almost"
> - Always clear the stack after allocating it or before starting the
> application
I'm not sure if this is a good idea. If helps with buggy applications only, which fully deserve to crash and die.
---
MS-DOS forever!
Complete thread:
- [BUG] unreadable reloXection deadlocks DPMILD32 - DOS386, 12.06.2008, 23:58 (DOSX)
- BUG? What BUG? - Japheth, 13.06.2008, 08:40
- BUG? What BUG? - DOS386, 14.06.2008, 15:02
- BUG? What BUG? - Japheth, 14.06.2008, 15:57
- 1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB - DOS386, 19.06.2008, 09:04
- 1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB - DOS386, 19.06.2008, 09:06
- 1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB - Japheth, 19.06.2008, 10:29
- 1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB - DOS386, 20.06.2008, 09:51
- Discovered a NEW BUG in DPMILD32 - DOS386, 18.12.2009, 03:21
- Discovered a NEW BUG in DPMILD32 - Japheth, 19.12.2009, 07:44
- Discovered a NEW BUG in DPMILD32 - DOS386, 19.12.2009, 14:04
- Discovered a NEW BUG in DPMILD32 - Japheth, 19.12.2009, 07:44
- 1. Closed: NOT a BUG | 2. Closed: NOT a BUG | 3. Closed: NB - DOS386, 19.06.2008, 09:04
- BUG? What BUG? - Japheth, 14.06.2008, 15:57
- BUG? What BUG? - DOS386, 14.06.2008, 15:02
- BUG? What BUG? - Japheth, 13.06.2008, 08:40