The problem occurs inside oq_write at line
Code: Select all
memcpy((void *)oqp->q_wrptr, (const void *)bp, n)
The GDB output is printed below:
Code: Select all
(gdb) s
123 memcpy((void *)oqp->q_wrptr, (const void *)bp, n);
(gdb) print (void*)oqp->q_wrptr
$4 = (void *) 0x20002c58 <sd_out_buf2>
(gdb) p (const void *)bp
$5 = (const void *) 0x20003a4b <wa_thd_uart2_tx+499>
(gdb) p n
$6 = 1
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x00206924 in ?? ()
I am currently out of ideas on how this could happen and how to further debug this, since a normal memcpy somewhere else does not give any problem at all. Could maybe someone give some advise on how to tackle this problem?