tevador / moddable

JavaScript engine to be used for cryptocurrency proof-of-work.
7 stars 1 forks source link

Segmentation fault in xsAllocator.c:74 #10

Open iljah opened 6 years ago

iljah commented 6 years ago

Debug and release builds on raspberry pi (ARMv7 Processor rev 4 (v7l), BCM2835) give:

gdb --args ./xst asdf
...
Program received signal SIGSEGV, Segmentation fault.
0x0001f778 in AllocateNewChunks (index=2)
    at /home/pi/moddable/xs/sources/xsAllocator.c:74
74          ((struct SChunk*)(ptr + i))->next = (struct SChunk*)(ptr + i + chunk_size);
(gdb) up
#1  0x0001f854 in my_malloc (size=4)
    at /home/pi/moddable/xs/sources/xsAllocator.c:94
94          chunk = AllocateNewChunks(index);
(gdb) 
#2  0x0001f9f0 in my_calloc (num=4, size=4)
    at /home/pi/moddable/xs/sources/xsAllocator.c:143
143     void* ptr = my_malloc(size);
(gdb) 
#3  0x0003b828 in fxInitializeSharedCluster ()
    at /home/pi/moddable/xs/sources/xsAtomics.c:515
515     gxSharedCluster = c_calloc(sizeof(txSharedCluster), 1);
(gdb) 
#4  0x00116b38 in main (argc=2, argv=0x7efff004)
    at /home/pi/moddable/xs/tools/xst.c:218
218     fxInitializeSharedCluster();

Is this a real bug or am I just using it wrong?

iljah commented 6 years ago

ping