NO

Author Topic: POMAKE bug  (Read 14085 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« on: December 13, 2004, 06:18:00 PM »
Hi Pelle,
I have problem with POMAKE utility, following is what I get:
Quote
c:\development\prjs\bootex\loader>pomake
pocc /Ze /Gm /Zl /Ox /cbstring           libc.c
pocc /Ze /Gm /Zl /Ox /cbstring           main.c
POMAKE: error: Internal error (Access violation).

With a MAKE utility from other suits there are no problems.
Thank-you Pelle for your time.
Regards
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #1 on: December 13, 2004, 07:22:24 PM »
Hello Frankie,

The message is from the 'catch all' exception handler: somewhere there is an EXCEPTION_ACCESS_VIOLATION exception - reading/writing a NULL pointer, or something like that.

Is it possible for you to narrow the problem down to a small example?

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #2 on: December 15, 2004, 08:10:39 PM »
Hi Pelle,
I'll try to make some other tests.
For now I can say that the problem is the same if I run an administrator or a standard user account on WXP SP2.
Regards
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #3 on: January 26, 2005, 01:34:22 PM »
Hi Pelle,
I made some checks with OllyDbg, and I found an access violation error @ the following code address:
Quote
00403FEA   . 803C02 00      CMP BYTE PTR DS:[EDX+EAX],0

Dissassembly is:
Quote
00403FC0   $ 55             PUSH EBP
00403FC1   . 89E5           MOV EBP,ESP
00403FC3   . 81EC A0000000  SUB ESP,0A0
00403FC9   . 53             PUSH EBX
00403FCA   . 56             PUSH ESI
00403FCB   . 57             PUSH EDI
00403FCC   . 31DB           XOR EBX,EBX
00403FCE   . C745 F0 000000>MOV DWORD PTR SS:[EBP-10],0
00403FD5   . C745 80 000000>MOV DWORD PTR SS:[EBP-80],0
00403FDC   . C685 7FFFFFFF >MOV BYTE PTR SS:[EBP-81],0
00403FE3   . 8B55 08        MOV EDX,DWORD PTR SS:[EBP+8]
00403FE6   . 83C8 FF        OR EAX,FFFFFFFF
00403FE9   > 40             INC EAX
00403FEA   . 803C02 00      CMP BYTE PTR DS:[EDX+EAX],0
00403FEE   .^75 F9          JNZ SHORT pomake.00403FE9
00403FF0   . 8D4400 01      LEA EAX,DWORD PTR DS:[EAX+EAX+1]
00403FF4   . 8945 F8        MOV DWORD PTR SS:[EBP-8],EAX
00403FF7   . 50             PUSH EAX                                 ; /Arg1
00403FF8   . E8 C3090000    CALL pomake.004049C0      ; \pomake.004049C0
00403FFD   . 8945 FC        MOV DWORD PTR SS:[EBP-4],EAX
00404000   . 89C6           MOV ESI,EAX
00404002   . 8B45 F8        MOV EAX,DWORD PTR SS:[EBP-8]
00404005   . 01F0           ADD EAX,ESI
00404007   . 8945 F4        MOV DWORD PTR SS:[EBP-C],EAX
0040400A   . 31FF           XOR EDI,EDI
0040400C   . E9 40050000    JMP pomake.00404551
00404011   > 8B45 FC        MOV EAX,DWORD PTR SS:[EBP-4]
00404014   . 8B55 F4        MOV EDX,DWORD PTR SS:[EBP-C]
00404017   . 39D0           CMP EAX,EDX
00404019   . 75 28          JNZ SHORT pomake.00404043
0040401B   . D165 F8        SHL DWORD PTR SS:[EBP-8],1
0040401E   . 8B45 FC        MOV EAX,DWORD PTR SS:[EBP-4]
00404021   . 29F0           SUB EAX,ESI
00404023   . 8945 EC        MOV DWORD PTR SS:[EBP-14],EAX
00404026   . 8B45 F8        MOV EAX,DWORD PTR SS:[EBP-8]
00404029   . 40             INC EAX
0040402A   . 50             PUSH EAX                                 ; /Arg2
0040402B   . 56             PUSH ESI                                 ; |Arg1
0040402C   . E8 BF090000    CALL pomake.004049F0                     ; \pomake.004049F0
00404031   . 89C6           MOV ESI,EAX
00404033   . 8B45 EC        MOV EAX,DWORD PTR SS:[EBP-14]
00404036   . 01F0           ADD EAX,ESI
00404038   . 8945 FC        MOV DWORD PTR SS:[EBP-4],EAX
0040403B   . 8B45 F8        MOV EAX,DWORD PTR SS:[EBP-8]
0040403E   . 01F0           ADD EAX,ESI
00404040   . 8945 F4        MOV DWORD PTR SS:[EBP-C],EAX
00404043   > 85FF           TEST EDI,EDI
00404045   . 0F8C 06050000  JL pomake.00404551
0040404B   . 83FF 07        CMP EDI,7
0040404E   . 0F8F FD040000  JG pomake.00404551
00404054   . FF24BD A0B2400>JMP DWORD PTR DS:[EDI*4+40B2A0]
0040405B   . 8B45 08        MOV EAX,DWORD PTR SS:[EBP+8]
0040405E   . 8038 24        CMP BYTE PTR DS:[EAX],24
00404061   . 75 0A          JNZ SHORT pomake.0040406D
00404063   . BF 01000000    MOV EDI,1
00404068   . E9 E4040000    JMP pomake.00404551
0040406D   > 837D 0C 00     CMP DWORD PTR SS:[EBP+C],0
00404071   . 74 12          JE SHORT pomake.00404085
00404073   . 8B45 08        MOV EAX,DWORD PTR SS:[EBP+8]
...... ..... .....


Registers are as follows
Quote
EAX 00000000
ECX 008671D0
EDX 00000000
EBX 00000000
ESP 0012FCC0
EBP 0012FD6C
ESI 0040D100 pomake.0040D100
EDI 008671D0
EIP 00403FEA pomake.00403FEA
C 0  ES 0023 32bit 0(FFFFFFFF)
P 1  CS 001B 32bit 0(FFFFFFFF)
A 1  SS 0023 32bit 0(FFFFFFFF)
Z 1  DS 0023 32bit 0(FFFFFFFF)
S 0  FS 0038 32bit 7FFDE000(FFF)
T 0  GS 0000 NULL
D 0
O 0  LastErr ERROR_MOD_NOT_FOUND (0000007E)
EFL 00010256 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty -UNORM 8A3A 77F57D70 77F944A8
ST1 empty -UNORM C498 00000000 00570AA8
ST2 empty 1.4034435980271971750e+1738
ST3 empty -??? FFFF 01870CB0 7F0054F7
ST4 empty 0.0982610205911805360e-4933
ST5 empty +UNORM 0061 006E0069 006D0072
ST6 empty +UNORM 0061 006E0069 006D0072
ST7 empty +UNORM 0069 00780065 0020002C
               3 2 1 0      E S P U O Z D I
FST 0000  Cond 0 0 0 0  Err 0 0 0 0 0 0 0 0  (GT)
FCW 027F  Prec NEAR,53  Mask    1 1 1 1 1 1


Partial Stack dump
Quote
0012FCAC   0040D100  pomake.0040D100
0012FCB0   008651A0
0012FCB4   00000000
0012FCB8   00000000
0012FCBC   00000000
0012FCC0   008671D0
0012FCC4   0040D100  pomake.0040D100
0012FCC8   008651A4
0012FCCC   00000014
0012FCD0   77F5BDE4  RETURN to ntdll.77F5BDE4
0012FCD4   77E79CB2  RETURN to kernel32.77E79CB2 from ntdll.ZwQueryInformationProcess
0012FCD8   00000048
0012FCDC   00000000
0012FCE0   0012FCF0
0012FCE4   00000018
0012FCE8   00000000
0012FCEC   00000000
0012FCF0   00000000
0012FCF4   7FFDF000
0012FCF8   00000001
0012FCFC   00000008
0012FD00   00000B70
0012FD04   77F5B5D4  RETURN to ntdll.77F5B5D4
0012FD08   77E7A683  RETURN to kernel32.77E7A683 from ntdll.ZwClose
0012FD0C   00000048
0012FD10   00404EBD  RETURN to pomake.00404EBD from kernel32.CloseHandle
0012FD14   00000048
0012FD18   00000044

I hope it could help.
Regards
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #4 on: January 26, 2005, 03:25:50 PM »
Hello Frankie,

I think it did - thanks!

It was the function that expand macros that got a NULL pointer, causing the exception. It's an especially messy, recursive thing - I only touch it if I absolutely have to... (like now...) ;)

Is the attached version working any better?

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #5 on: January 26, 2005, 05:27:47 PM »
Hi Pelle,
We are not luky!
This is the new access violation @ address 0x00402115, attempt to read location 0x00000000.
code:
Quote
00402000  /$ 55             PUSH EBP
00402001  |. 89E5           MOV EBP,ESP
00402003  |. 81EC 28010000  SUB ESP,128
00402009  |. 53             PUSH EBX
0040200A  |. 56             PUSH ESI
0040200B  |. 57             PUSH EDI
0040200C  |. 8B5D 08        MOV EBX,DWORD PTR SS:[EBP+8]
0040200F  |. C745 F8 000000>MOV DWORD PTR SS:[EBP-8],0
00402016  |. 6A 00          PUSH 0                                   ; /Arg2 = 00000000
00402018  |. 68 5EB14000    PUSH pomake.0040B15E                     ; |Arg1 = 0040B15E ASCII "MAKE"
0040201D  |. E8 0E1B0000    CALL pomake.00403B30                     ; \pomake.00403B30
00402022  |. 8945 E8        MOV DWORD PTR SS:[EBP-18],EAX
00402025  |. 85C0           TEST EAX,EAX
00402027  |. 74 15          JE SHORT pomake.0040203E
00402029  |. 8B40 08        MOV EAX,DWORD PTR DS:[EAX+8]
0040202C  |. 85C0           TEST EAX,EAX
0040202E  |. 74 0E          JE SHORT pomake.0040203E
00402030  |. 8B45 E8        MOV EAX,DWORD PTR SS:[EBP-18]
00402033  |. 8B40 08        MOV EAX,DWORD PTR DS:[EAX+8]
00402036  |. 8985 E0FEFFFF  MOV DWORD PTR SS:[EBP-120],EAX
0040203C  |. EB 0A          JMP SHORT pomake.00402048
0040203E  |> C785 E0FEFFFF >MOV DWORD PTR SS:[EBP-120],pomake.0040B1>
00402048  |> 8B85 E0FEFFFF  MOV EAX,DWORD PTR SS:[EBP-120]
0040204E  |. 8945 EC        MOV DWORD PTR SS:[EBP-14],EAX
00402051  |. 68 04010000    PUSH 104                                 ; /Arg2 = 00000104
00402056  |. 8D85 E4FEFFFF  LEA EAX,DWORD PTR SS:[EBP-11C]           ; |
0040205C  |. 50             PUSH EAX                                 ; |Arg1
0040205D  |. E8 AE2D0000    CALL pomake.00404E10                     ; \pomake.00404E10
00402062  |. 8945 F0        MOV DWORD PTR SS:[EBP-10],EAX
00402065  |. 837D F0 00     CMP DWORD PTR SS:[EBP-10],0
00402069  |. 0F84 19030000  JE pomake.00402388
0040206F  |. 8B45 F0        MOV EAX,DWORD PTR SS:[EBP-10]
00402072  |. 0D 00800000    OR EAX,8000
00402077  |. 50             PUSH EAX                                 ; /Arg1
00402078  |. E8 B3060000    CALL pomake.00402730                     ; \pomake.00402730
0040207D  |. 59             POP ECX
0040207E  |. E9 05030000    JMP pomake.00402388
00402083  |> 6A 01          /PUSH 1
00402085  |. 8B03           |MOV EAX,DWORD PTR DS:[EBX]
00402087  |. 8B00           |MOV EAX,DWORD PTR DS:[EAX]
00402089  |. 50             |PUSH EAX
0040208A  |. E8 311F0000    |CALL pomake.00403FC0
0040208F  |. 8945 FC        |MOV DWORD PTR SS:[EBP-4],EAX
00402092  |. 8B03           |MOV EAX,DWORD PTR DS:[EBX]
00402094  |. 8B40 04        |MOV EAX,DWORD PTR DS:[EAX+4]
00402097  |. 83E0 01        |AND EAX,1
0040209A  |. 75 1A          |JNZ SHORT pomake.004020B6
0040209C  |. 833D 6CE04000 >|CMP DWORD PTR DS:[40E06C],0
004020A3  |. 75 11          |JNZ SHORT pomake.004020B6
004020A5  |. 8B45 FC        |MOV EAX,DWORD PTR SS:[EBP-4]
004020A8  |. 50             |PUSH EAX                                ; /Arg2
004020A9  |. 68 5AB14000    |PUSH pomake.0040B15A                    ; |Arg1 = 0040B15A ASCII "%s
"
004020AE  |. E8 9D350000    |CALL pomake.00405650                    ; \pomake.00405650
004020B3  |. 83C4 08        |ADD ESP,8
004020B6  |> 8B55 FC        |MOV EDX,DWORD PTR SS:[EBP-4]
004020B9  |. 83C8 FF        |OR EAX,FFFFFFFF
004020BC  |> 40             |/INC EAX
004020BD  |. 803C02 00      ||CMP BYTE PTR DS:[EDX+EAX],0
004020C1  |.^75 F9          |\JNZ SHORT pomake.004020BC
004020C3  |. 85C0           |TEST EAX,EAX
004020C5  |. 74 2F          |JE SHORT pomake.004020F6
004020C7  |. 8B55 FC        |MOV EDX,DWORD PTR SS:[EBP-4]
004020CA  |. 83C8 FF        |OR EAX,FFFFFFFF
004020CD  |> 40             |/INC EAX
004020CE  |. 803C02 00      ||CMP BYTE PTR DS:[EDX+EAX],0
004020D2  |.^75 F9          |\JNZ SHORT pomake.004020CD
004020D4  |. 40             |INC EAX
004020D5  |. 50             |PUSH EAX                                ; /Arg1
004020D6  |. E8 F5280000    |CALL pomake.004049D0                    ; \pomake.004049D0
004020DB  |. 89C1           |MOV ECX,EAX
004020DD  |. 8B55 FC        |MOV EDX,DWORD PTR SS:[EBP-4]
004020E0  |. 51             |PUSH ECX
004020E1  |. 29D1           |SUB ECX,EDX
004020E3  |> 8A02           |/MOV AL,BYTE PTR DS:[EDX]
004020E5  |. 880411         ||MOV BYTE PTR DS:[ECX+EDX],AL
004020E8  |. 42             ||INC EDX
004020E9  |. 84C0           ||TEST AL,AL
004020EB  |.^75 F6          |\JNZ SHORT pomake.004020E3
004020ED  |. 58             |POP EAX
004020EE  |. 8985 DCFEFFFF  |MOV DWORD PTR SS:[EBP-124],EAX
004020F4  |. EB 0A          |JMP SHORT pomake.00402100
004020F6  |> C785 DCFEFFFF >|MOV DWORD PTR SS:[EBP-124],0
00402100  |> 8B85 DCFEFFFF  |MOV EAX,DWORD PTR SS:[EBP-124]
00402106  |. 8945 F4        |MOV DWORD PTR SS:[EBP-C],EAX
00402109  |. 50             |PUSH EAX                                ; /Arg1
0040210A  |. E8 D12F0000    |CALL pomake.004050E0                    ; \pomake.004050E0
0040210F  |. 89C7           |MOV EDI,EAX
00402111  |. 8B45 EC        |MOV EAX,DWORD PTR SS:[EBP-14]
00402114  |. 50             |PUSH EAX
00402115  |. 8B07           |MOV EAX,DWORD PTR DS:[EDI]
00402117  |. 50             |PUSH EAX
00402118  |. E8 63350000    |CALL pomake.00405680
0040211D  |. 83C4 08        |ADD ESP,8
00402120  |. 85C0           |TEST EAX,EAX
00402122  |. 75 0B          |JNZ SHORT pomake.0040212F
00402124  |. 57             |PUSH EDI                                ; /Arg1
00402125  |. E8 96030000    |CALL pomake.004024C0                    ; \pomake.004024C0
0040212A  |. E9 3E020000    |JMP pomake.0040236D
0040212F  |> 833D 68E04000 >|CMP DWORD PTR DS:[40E068],0
00402136  |. 0F85 31020000  |JNZ pomake.0040236D
0040213C  |. 8B03           |MOV EAX,DWORD PTR DS:[EBX]
0040213E  |. 8B40 04        |MOV EAX,DWORD PTR DS:[EAX+4]
00402141  |. 83E0 04        |AND EAX,4
00402144  |. 75 21          |JNZ SHORT pomake.00402167
00402146  |. 68 56B14000    |PUSH pomake.0040B156                    ;  ASCII "<|>"
0040214B  |. 8B45 FC        |MOV EAX,DWORD PTR SS:[EBP-4]
0040214E  |. 50             |PUSH EAX
0040214F  |. E8 6C350000    |CALL pomake.004056C0
00402154  |. 83C4 08        |ADD ESP,8
00402157  |. 85C0           |TEST EAX,EAX
00402159  |. 74 0C          |JE SHORT pomake.00402167
0040215B  |. 8B03           |MOV EAX,DWORD PTR DS:[EBX]
0040215D  |. 83C0 04        |ADD EAX,4
00402160  |. 8B10           |MOV EDX,DWORD PTR DS:[EAX]
00402162  |. 83CA 04        |OR EDX,4
00402165  |. 8910           |MOV DWORD PTR DS:[EAX],EDX
00402167  |> BE 60D04000    |MOV ESI,pomake.0040D060
0040216C  |. EB 34          |JMP SHORT pomake.004021A2
0040216E  |> 8B07           |/MOV EAX,DWORD PTR DS:[EDI]
00402170  |. 50             ||PUSH EAX
00402171  |. 8B06           ||MOV EAX,DWORD PTR DS:[ESI]
00402173  |. 50             ||PUSH EAX
00402174  |. E8 07350000    ||CALL pomake.00405680
00402179  |. 83C4 08        ||ADD ESP,8
0040217C  |. 8B13           ||MOV EDX,DWORD PTR DS:[EBX]
0040217E  |. 83C2 04        ||ADD EDX,4
00402181  |. 8B0A           ||MOV ECX,DWORD PTR DS:[EDX]
00402183  |. 83E1 FB        ||AND ECX,FFFFFFFB
00402186  |. 85C0           ||TEST EAX,EAX
00402188  |. 0F94C0         ||SETE AL
0040218B  |. 83E0 01        ||AND EAX,1
0040218E  |. C1E0 1F        ||SHL EAX,1F
00402191  |. C1F8 1F        ||SAR EAX,1F
00402194  |. 01C0           ||ADD EAX,EAX
00402196  |. 01C0           ||ADD EAX,EAX
00402198  |. 83E0 04        ||AND EAX,4
0040219B  |. 09C1           ||OR ECX,EAX
0040219D  |. 890A           ||MOV DWORD PTR DS:[EDX],ECX
0040219F  |. 83C6 04        ||ADD ESI,4
004021A2  |> 8B03           | MOV EAX,DWORD PTR DS:[EBX]
004021A4  |. 8B40 04        ||MOV EAX,DWORD PTR DS:[EAX+4]
004021A7  |. 83E0 04        ||AND EAX,4
004021AA  |. 75 06          ||JNZ SHORT pomake.004021B2
004021AC  |. 8B06           ||MOV EAX,DWORD PTR DS:[ESI]
004021AE  |. 85C0           ||TEST EAX,EAX
004021B0  |.^75 BC          |\JNZ SHORT pomake.0040216E
004021B2  |> 833D 58E04000 >|CMP DWORD PTR DS:[40E058],0
004021B9  |. 75 0E          |JNZ SHORT pomake.004021C9
004021BB  |. 8B03           |MOV EAX,DWORD PTR DS:[EBX]
004021BD  |. 8B40 04        |MOV EAX,DWORD PTR DS:[EAX+4]
004021C0  |. 83E0 04        |AND EAX,4
004021C3  |. 0F84 BE000000  |JE pomake.00402287
004021C9  |> 8B47 04        |MOV EAX,DWORD PTR DS:[EDI+4]
004021CC  |. 85C0           |TEST EAX,EAX
004021CE  |. 74 39          |JE SHORT pomake.00402209
004021D0  |. 8B07           |MOV EAX,DWORD PTR DS:[EDI]
004021D2  |. 50             |PUSH EAX
004021D3  |. 68 5FB24000    |PUSH pomake.0040B25F                    ;  ASCII "cd"
004021D8  |. E8 A3340000    |CALL pomake.00405680
004021DD  |. 83C4 08        |ADD ESP,8
004021E0  |. 85C0           |TEST EAX,EAX
004021E2  |. 74 14          |JE SHORT pomake.004021F8
004021E4  |. 8B07           |MOV EAX,DWORD PTR DS:[EDI]
004021E6  |. 50             |PUSH EAX
004021E7  |. 68 54B24000    |PUSH pomake.0040B254                    ;  ASCII "chdir"
004021EC  |. E8 8F340000    |CALL pomake.00405680
004021F1  |. 83C4 08        |ADD ESP,8
004021F4  |. 85C0           |TEST EAX,EAX
004021F6  |. 75 11          |JNZ SHORT pomake.00402209
004021F8  |> 8B47 04        |MOV EAX,DWORD PTR DS:[EDI+4]
004021FB  |. 50             |PUSH EAX                                ; /Arg1
004021FC  |. E8 3F2C0000    |CALL pomake.00404E40                    ; \pomake.00404E40
... .... .... .... ..... .....

Registers
Quote
EAX 00860A14 ASCII "POMAKE"
ECX 00000001
EDX 0040B2CB pomake.0040B2CB
EBX 008651A4
ESP 0012FD78
EBP 0012FEB0
ESI 0040D100 pomake.0040D100
EDI 00000000
EIP 00402115 pomake.00402115
C 0  ES 0023 32bit 0(FFFFFFFF)
P 1  CS 001B 32bit 0(FFFFFFFF)
A 0  SS 0023 32bit 0(FFFFFFFF)
Z 1  DS 0023 32bit 0(FFFFFFFF)
S 0  FS 0038 32bit 7FFDE000(FFF)
T 0  GS 0000 NULL
D 0
O 0  LastErr ERROR_MOD_NOT_FOUND (0000007E)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty -UNORM 8A3A 77F57D70 77F944A8
ST1 empty -UNORM BABC 00000000 00570AA8
ST2 empty -UNORM AE28 0012BAFC 0012BB84
ST3 empty 0.0000000000000004740e-4933
ST4 empty 3.1477320061368351680e-4932
ST5 empty +UNORM 0082 00100492 77D486CB
ST6 empty -UNORM ABCD 77D6ADC5 00000000
ST7 empty -UNORM BB94 77D6ADC5 0012BB70
               3 2 1 0      E S P U O Z D I
FST 0000  Cond 0 0 0 0  Err 0 0 0 0 0 0 0 0  (GT)
FCW 027F  Prec NEAR,53  Mask    1 1 1 1 1 1

Stack:
Quote
0012FD10   00404ECD  pomake.00404ECD
0012FD14   00405620  pomake.00405620
0012FD18   0040D344  pomake.0040D344
0012FD1C   0040B2CB  pomake.0040B2CB
0012FD20   00000000
0012FD24   00000000
0012FD28   00000000
0012FD2C   00000000
0012FD30   00000000
0012FD34   00000000
0012FD38   FFFFFFFF
0012FD3C   00000001
0012FD40   00000000
0012FD44   00000000
0012FD48   00000003
0012FD4C   0012FD6C
0012FD50   0040566C  pomake.0040566C
0012FD54   00405620  pomake.00405620
0012FD58   0040D344  pomake.0040D344
0012FD5C   0040B15A  ASCII "%s
"
0012FD60   008671D0
0012FD64   0040D100  pomake.0040D100
0012FD68   008651A4
0012FD6C   00000014
0012FD70   0012FEB0
0012FD74   0040210F  pomake.0040210F
0012FD78   00860A14  ASCII "POMAKE"
0012FD7C   000003F7
0012FD80   0012BBD4
0012FD84   7FFDF000
0012FD88   00000000
0012FD8C   00000000
0012FD90   00860A14  ASCII "POMAKE"
....... ... ..

Cordially
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #6 on: January 26, 2005, 06:24:48 PM »
Hello Frankie,

Damn. At least I think I know where we are in POMAKE...

Let's try this version - can't be any worse... ;)

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #7 on: January 26, 2005, 08:58:45 PM »
OK Pelle,
you win the prize!
This version works correctly. Good job.
Thanks
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #8 on: January 26, 2005, 09:03:34 PM »
Finally! Great. Thanks!

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #9 on: January 26, 2005, 09:11:42 PM »
Uh uh,
I was too fast  :? !
With a command line of roughly 140 chars (most of it are files paths) I get:
Quote
POMAKE: fatal error: The system cannot find the file specified.
Code: [Select]

Once again the other make works.
I'm not sure which is the file that it cannot find, the path of the executable file is 42 bytes long then some switch and finally other two paths very long (total 140 or more).
In this case is very difficult to trace the execution.
Some idea?

F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #10 on: January 26, 2005, 09:23:24 PM »
Pelle,
to help you this is the line that doesn't work:
Code: [Select]
- C:\development\tools\mytool22\mytool22.exe C:\Development\prjs\myproj\tool1\1.fll /K C:\Development\prjs\myproj\tools1\fllfll.exe /J /B

So you have an idea.
Cheers
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #11 on: January 26, 2005, 10:24:22 PM »
Frankie,

The "-" is part of the command - to ignore the return code?
If so, what happens if you remove the space(s) between "-" and "C:\..." ?

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #12 on: January 28, 2005, 10:49:22 AM »
Hi Pelle,
You're wright it works.
What's strange is that I have another shorter command:
Quote
- copy $(PROJ).exe a:

Just before the other one that doesn't complain about the space between '-' and 'copy $(PROJ).exe a:'. Moreover make utilities from other packages work fine.
Anyway now I can use POMAKE.
Thank-you Pelle.
Cordially
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE bug
« Reply #13 on: January 28, 2005, 02:06:35 PM »
Hello Frankie,

Quote from: "frankie"

You're wright it works.
What's strange is that I have another shorter command:
Quote
- copy $(PROJ).exe a:

Just before the other one that doesn't complain about the space between '-' and 'copy $(PROJ).exe a:'. Moreover make utilities from other packages work fine.

The difference is that copy is a shell/DOS command, so the command interpreter must bu run (command.com, cmd.exe, ...). This one can obviously handle the space in front of the command. In the problematic case, I run the executable directly - through CreateProcess, which seems to have problems with spaces.

Anyway, POMAKE now strip spaces for this case too. See attached version.

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
POMAKE bug
« Reply #14 on: January 28, 2005, 03:27:38 PM »
Ok Pelle,
this works fine.
May I suggest to add to the warning on error commands that the error has been ignored?
I.e. with command:
Quote
- copy $(PROJ).exe a:

If the drive is not present I get the warning:
Quote
POMAKE: warning: 'copy', error 1.

Could read better:
Quote
POMAKE: warning: 'copy', error 1. Ignored.

Thank you
Regards
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide