After I re-read my response, I noticed that you say that you're copying into
a structure. Is the structure allocated? I know it's a stupid question, but
bus errors are typically caused by byte alignment problems (or bad pointers)
On Fri, Jul 28, 2000 at 03:57:13PM -0500, David Frascone wrote:
> Your buffers are probably overlapping. Try using bcopy instead. I know
> it handles overlaping buffers properly.
>
> On Fri, Jul 28, 2000 at 04:50:55PM -0400, Jacques Ludman wrote:
> > Hi,
> >
> > I'm compiling using gcc version 2.95.2.
> >
> > I've been getting a bus error when I use memcpy to copy some stuff into
> > a structure out of the packet buffer:
> >
> > memcpy((void *)&haadr, (void *)dp, sizeof(haadr));
> >
> > --sizeof(haadr) = 32
> >
> > I was able to remedy the problem by adding -fno-builtin to the CFLAGS in
> > the configure file, which causes some extra warnings to be spit out
> > during the compilation:
> >
> > packet-trmac.c:235: warning: implicit declaration of function `memcpy'
> >
> > suggestions?
> >
> > thx,
> > jj