You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a segmentation fault on 64-bit Linux Mint on this file:
#include <console>
main()
{
printf("hello\n");
}
Compile string is pawncc -C:64 hello.p, pawncc is compiled with -DHAVE_I64 -DPAWN_CELL_SIZE=64, pawnrun is compiled with AMX_ALTCORE (GNU extensions). This segfault traces back into amx_Exec->amx_exec_run->first NEXT instruction, it executes 7 times then crashes. Corresponding macro expansion is #define NEXT(cip,op) goto *amx_opcodelist[(op=*cip++) & ((1 << sizeof(cell)*4)-1)]
My knowledge of underlying procedures ends here.
When compiling without AMX_ALTCORE, the same behaviour occurs: execution reaches the main for ( ;; ) loop, does 7 iterations and crashes successfully.
If I substitute printf with print in pawn code, it crashes after 13 iterations.
It seems that the segfault occurs with every native function that *.inc files in pawn toolkit provide (even with clamp; some other functions cause just run-time errors).
This problem arises in 32-bit pawn codes too, so I moved this post out of 64-bit thread into a new one.
The text was updated successfully, but these errors were encountered:
For 32-bit cells, commit 37cee7c has a number of bug-fixes. However AMX_ALTCORE requires that the cell size is the same as the native pointer size. So this is a fix to a laterally related problem.
I am getting a segmentation fault on 64-bit Linux Mint on this file:
Compile string is
pawncc -C:64 hello.p
, pawncc is compiled with-DHAVE_I64 -DPAWN_CELL_SIZE=64
, pawnrun is compiled withAMX_ALTCORE
(GNU extensions). This segfault traces back into amx_Exec->amx_exec_run->first NEXT instruction, it executes 7 times then crashes. Corresponding macro expansion is#define NEXT(cip,op) goto *amx_opcodelist[(op=*cip++) & ((1 << sizeof(cell)*4)-1)]
My knowledge of underlying procedures ends here.
When compiling without AMX_ALTCORE, the same behaviour occurs: execution reaches the main
for ( ;; )
loop, does 7 iterations and crashes successfully.If I substitute printf with print in pawn code, it crashes after 13 iterations.
It seems that the segfault occurs with every native function that *.inc files in pawn toolkit provide (even with clamp; some other functions cause just run-time errors).
This problem arises in 32-bit pawn codes too, so I moved this post out of 64-bit thread into a new one.
The text was updated successfully, but these errors were encountered: