On Thu, 16 Dec 2004, Christian [iso-8859-1] Røsnes wrote: > Hi > > I'm trying to setup an OpenVPN server on a Comapq DS10 box. > The DS10 is Alph architecture, and running OpenBSD 3.5 for Alpha. > I'm using OpenVPN 2.0 rc4, both on client and server. > > ******************* > Problem Description > ******************* > > I've compiled OpenVPN 2.0 rc4 (server) on the DS10 > with the following versions of gcc and OpenSSL: > > gcc 2.95.3 > OpenSSL 0.9.7c > > The client is running Windows XP and OpenVPN 2.0 rc4. > > I can connect each endpoint, but when I try to ping either endpoint of the > vpn tunnel, the OpenVPN server dumps core and dies: > > pid 17868 (openvpn): unaligned access: va=0x12012f82f pc=0x120023900 > ra=0x1200238f4 op=ldl > Bus error (core dumped) > > Using gdb, I find: > > # gdb /usr/local/sbin/openvpn openvpn.core > GNU gdb 4.16.1 > ... > This GDB was configured as "alpha-unknown-openbsd3.5"... > Core was generated by `openvpn'. > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > Program terminated with signal 10, Bus error. > #0 0x120023904 in mroute_extract_addr_from_packet > (src=0x1ffffb220, dest=0x1ffffb208, buf=0x1, tunnel_type=-20292) at > mroute.c:113 > 113 memcpy (src->addr, &ip->saddr, 4); > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > I think my system choke on the 'ip->saddr' address in the memcpy statement.
That's strange that it would hit an alignment fault on a memcpy. memcpy is supposed to operate at byte granularity. The whole reason I use memcpy here in the first place is to prevent alignment faults on the legacy processors that have trouble with them. Now on the other hand if the compiler tried to optimize the memcpy into a 32 bit move instruction, then there will be problems because ip is not aligned correctly for that. What assembly code is being generated for the memcpy? Try, just as a test, compiling without optimization, and see if it affects the code generated for the memcpy. James