memcpy limitation

Bernd Walter ticso at cicely12.cicely.de
Thu Jan 11 10:15:38 UTC 2007


I get a sigbus with the following:
#0  0x00033158 in $a () at lcp.c:939
939           memcpy(&req, opt, sizeof req);
(gdb) print req
$1 = {hdr = {id = 0 '\0', len = 0 '\0'}, proto = 0, period = 0}
(gdb) print &req
$2 = (struct lqrreq *) 0xbfffe4a0
(gdb) print opt
$3 = (struct fsm_opt *) 0xbfffe5b6

Shouldn't memcpy work with any alignment?

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the freebsd-arm mailing list