asked 2015-12-11 05:09:45 -0700
This post is a wiki. Anyone with karma >75 is welcome to improve it.
I had cross compiled alljoyn standard SDK in my host machine. The binaries are also created properly.
I had copied ControlPanelSample binary and library files. (I follow the link https://allseenalliance.org/framework... ).
But when I run the binary - ControlPanelSample, I am getting following error:
ControlPanelSample: common/os/posix/Thread.cc:234: Assertion `thread != __null' failed.
Please help me for solving this issue.
Am I missing something related to thread ?
The issue is with the sigset_t datatype size. The sigset_t is used in Thread.cc file.
The size of sigset_t is 8 bytes on my host PC. But the size of the sigset_t is 128 bytes on the target platform.
The issue raised in this scenario: 1) The Thread.cc file has been compiled on the host machine with consideration of size of sigset_t is 8 bytes (This is the culprit). 2) So while running the sample application on the target platform, the function sigemptyset() takes the parameter sigset_t of 128 byte size. 3) But actual stack size allocation for this parameter (sigset_t) is 8 bytes. 4) So the stack overwriting the memory space occupied by thread variable.
So the issue comes.............
I had checked the header file sigset.h from the target platform tool-chain path. I found 3 files: ./i586-poky-linux/usr/include/bits/sigset.h ./i586-poky-linux/usr/src/debug/glibc/2.20-r0/git/sysdeps/unix/sysv/linux/bits/sigset.h ./i586-poky-linux/usr/src/debug/lib32-uclibc/0.9.33+gitAUTOINC+48a0006012-r9/git/include/bits/sigset.h
Last file is the actual which needs to be include while compiling the code.
So my question is why compiler takes different file path for sigset.h ?