flat assembler
Message board for the users of flat assembler.
Index
> Main > Program fails on invoke ExitProcess, 0 |
Author |
|
revolution 02 Dec 2019, 19:40
In theory ExitProcess cannot fail. It should close the program and all open resources without ever returning.
But what do you mean by "fails"? Crashes? Won't close? Something else? Try to cut down your code to the minimal code that produces the failure. Post your code here and we might be able to help. |
|||
02 Dec 2019, 19:40 |
|
DSblizzard 02 Dec 2019, 20:01
Windows message box "Прекращена работа программы 1.exe" ("The program 1.exe stopped" or something like this)
Details: (sorry, in Russian) Сигнатура проблемы: Имя события проблемы: APPCRASH Имя приложения: 1.exe Версия приложения: 0.0.0.0 Отметка времени приложения: 5de55d1c Имя модуля с ошибкой: ntdll.dll Версия модуля с ошибкой: 6.1.7601.23915 Отметка времени модуля с ошибкой: 59b94ee4 Код исключения: c0000005 Смещение исключения: 000000000004e664 Версия ОС: 6.1.7601.2.1.0.256.48 Код языка: 1049 Дополнительные сведения 1: b31c Дополнительные сведения 2: b31cfdaf05d416b0a7d396d7b4049a84 Дополнительные сведения 3: 90e7 Дополнительные сведения 4: 90e75a2f5888e05373d1c95572b47705 |
|||
02 Dec 2019, 20:01 |
|
revolution 02 Dec 2019, 20:28
That is a crash.
So you might have corrupted your import section and the pointer to ExitProcess leads to an unknown place. |
|||
02 Dec 2019, 20:28 |
|
DSblizzard 03 Dec 2019, 08:33
I printed values of ExitProcess and [ExitProcess] after entry point of program and just before "invoke ExitProcess, 0". They are preserved. But ExitProcess is different from its value in "empty" program.
|
|||
03 Dec 2019, 08:33 |
|
revolution 03 Dec 2019, 08:43
Because of ASLR you can get different values for the API calls.
Are you sure it is ExitProcess? That would be very unlikely IMO. Perhaps you have another problem. |
|||
03 Dec 2019, 08:43 |
|
DimonSoft 03 Dec 2019, 09:31
Heap corruption?
|
|||
03 Dec 2019, 09:31 |
|
edfed 03 Dec 2019, 10:14
try it with ollydbg or ida
|
|||
03 Dec 2019, 10:14 |
|
DSblizzard 03 Dec 2019, 11:38
Thank you all, especially DimonSoft. I reduced program, then printed addresses in all mov [], ... commands, and finally spot the problem: in malloc size was assumed 8 bytes but really it was 16 - type and value.
|
|||
03 Dec 2019, 11:38 |
|
guignol 04 Dec 2019, 09:51
reminds of a waitress in a diner
|
|||
04 Dec 2019, 09:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.