> ::status
debugging core file of dif100c1 (64-bit) from localhost
file: /blah/file
initial argv: file 2 016 202
threading model: multi-threaded
status: process terminated by SIGBUS (Bus Error)
> ::stack
libc.so.1`realfree+0x70(ffffffff7fffddf8, 57, 1d9d08, 54, ffffffff7ef3c000, ffffffff7fffdde8)
libc.so.1`cleanfree+0x68(0, 1d939c, ffffffff7ef4cac8, 0, ffffffff7ef3c000, ffffffff7ef4cbc8)
libc.so.1`_malloc_unlocked+0x10c(10, 0, 0, ffffffff7ef3c000, 0, 0)
libc.so.1`malloc+0x5c(9, 2390, 1da460, 0, ffffffff7ef3c000, 2000)
get_response+0x74(10010fe28, 10010fe28, 0, 0, 0, 0)
send_to_sic+0x50(100174480, 7fffffff, 7ffffc00, 10010e672, 10010e676, 45)
main+0x1218(10010e68c, 10010e694, 10010e6a6, 10010e6ae, 10010e6b2, 10010e6b6)
_start+0x17c(0, 0, 0, 0, 0, 0)
>
int get_response( CONPARAM *at_conparamp)
{
int wi_bytes=0;
char *sic_resp;
char record_receive[2048]; /* Read the max by record */
char wc_sic_resp_len[5]="";
int wi_siclen;
int wi_ind;
sigset(SIGALRM,sighand);
alarm(gi_sic_timeout);
if ((sic_resp=(char *)malloc(9))==(char *)NULL)
{
sml_write_log("%s: ERROR: Failed to allocate memory for SCAM reply msg",IDSMLIFA);
return 1;
}
Но. malloc() же должен по идее всегда возвращать aligned память и сигбас возникать не должно? это баг в libc? //код не мой