Menu

#1 fbKeyboard.cpp segfaults

open
nobody
None
5
2012-12-30
2012-12-30
Night Rain
No

Compiling fbKeyboard.cpp on ARM and running it immediately segfaults on:

line 290: fZone[...]=bZone[...]=kZone[...];

Having a quick look at the code, it seems to me fZone and bZone should be same size, however
line 218: posix_memalign((void**)&fZone,sizeof(v4ui),screenSize.smallLength))
allocs a a larger chunk of memory for fZone than:
line 222: posix_memalign((void**)&bZone,sizeof(v4ui),keyboardSize.x*keyboardSize.y*sizeof(unsigned))
does for bZone. The bZone assignment on line 290 thus causes a segfault.

Making bZone alloc equal to fZone seems to fix the problem, however I have not taken a closer look at the code and don't know whether there's a bigger issue behind it.

Discussion


Log in to post a comment.