flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 02 Oct 2015, 12:22
Why not to run it in a debugger and see on what instruction you get segmentation fault?
If you are importing posix_memalign from a dynamic library, you should call it indirectly: Code: call [posix_memalign] P.S. It is a bad style IMHO to use "EQU" for numeric constants. Use "=" instead. In FASM these two are not equal. |
|||
![]() |
|
sakkiesalm 02 Oct 2015, 12:31
JohnFound wrote: Why not to run it in a debugger and see on what instruction you get segmentation fault? hi,thanks Yes i did run it in debugger and i get error when accessing that memory part Code: mov [HashBuffer + hashsize - 256],45 If i use a smaller number for example Code: mov [HashBuffer + 1000000 - 256],45 i do not get an error.But why cannot i use the whole allocated amount ? I tried = also now still same error I did check,memory gets allocated correctly,in task manager after running Code: call posix_memalign |
|||
![]() |
|
ProphetOfDoom 02 Oct 2015, 23:12
Hi sakkiesalm,
It looks like you are treating HashBuffer as a pointer when really it's a pointer to a pointer. You had the right idea when you moved the result into rax. Try replacing the segfaulting line with this: Code: mov qword [rax + hashsize - 256], 45 |
|||
![]() |
|
sakkiesalm 03 Oct 2015, 04:34
ProphetOfDoom wrote: Hi sakkiesalm, hi ProphetOfDoom Thank you,that seems to solve the problem! ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.