[Vm-dev] Bug in primitiveGetNextEvent?
Javier Diaz-Reinoso
javier_diaz_r at mac.com
Sat Sep 26 16:03:44 UTC 2015
In my test of the iOS VM it have a crash calling primitiveGetNextEvent, but only when is SQ_HOST64, I find the problem is because evtBuf is declared int:
int evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
but pointed by sqInputEvent declared in sq.h as long:
/* generic input event */
typedef struct sqInputEvent
{
long type; /* type of event; either one of EventTypeXXX */
unsigned long timeStamp; /* time stamp */
/* the longerpretation of the following fields depend on the type of the event */
long unused1;
long unused2;
long unused3;
long unused4;
long unused5;
long windowIndex; /* SmallInteger used in image to identify a host window structure */
} sqInputEvent;
for some reason this works when is SQ_HOST32 but crash when is SQ_HOST64, when I change int to long all works OK.
This is in interp.c who is generated by VMMaker:
/* Smalltalk from Squeak4.5 with VMMaker 4.13.12 translated as C source on 28 March 2015 8:15:47 pm */
I think one of the declaration needs to be changed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150926/7270a238/attachment.htm
More information about the Vm-dev
mailing list