flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Segmentation fault question |
Author |
|
revolution 27 Jun 2018, 11:05
You probably need to keep the stack aligned to a multiple of 8 byte.
Code: sub rsp, 0x0C ;<--- not a multiple of 8 bytes |
|||
27 Jun 2018, 11:05 |
|
Azagaros 27 Jun 2018, 11:14
It was a Gnu assembler example, that I tried sample code from and it worked. That example used register size for 8 byte registers was 4, which I found odd.
i have changed the 12 to 24 and still no change. |
|||
27 Jun 2018, 11:14 |
|
revolution 27 Jun 2018, 12:02
You still have an unbalanced stack from the first "je .toNextArg". You adjust the stack downwards and then never adjust it back up when the jump is made.
Also, I'm not clear on why you adjust the stack like that. It isn't fastcall or any normal call method for 64-bit code. |
|||
27 Jun 2018, 12:02 |
|
Azagaros 27 Jun 2018, 12:24
I am starting to find you an idiot at this point. You do not not remove the comments on the offending code. It is the call to the function outside the main function that is the issue and not the local jump. I remove the jump to the function and it works as expected. In other words you are not running the code. 3*8 is 24 last time checked, if all general registers are 8 bytes wide. The code I am testing from has nothing in the function but calling label and return statement... It is not making the call to the function.
|
|||
27 Jun 2018, 12:24 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.