我必须分配一个未知大小的数据结构,并在.bss部分使用一个指针。除非我正在尝试访问数据结构的第二个元素,否则一切都工作正常
section .bss
my_ds: resd 1 //declaration
...
push eax //eax is holding the size of the stack
call malloc //initialize
add esp, 4
mov [my_ds], dword eax
...
mov ecx, [size] //size is holdong the current size of the stack
mov dword edx, [my_ds+4*ecx]
**mov bl, [edx]** //in this line i get segmantation fault only when size =1