I've written a small program that resembles the problem I'm facing in my project. The question is, why does it crash when run on HP-UX platform ?
Error :
si_code: 1 - BUS_ADRALN - Invalid address alignment
Code :
int main()
{
uint8_t *cmd ;
cmd = (uint8_t *) malloc(77);
uint32_t gen = 20;
*(uint32_t*)&cmd[10] = gen; /* crash here */
return 0;
}