openvpn dies in recent -CURRENT

Pieter de Goeje pieter at
Sat May 19 23:37:46 UTC 2007

On Saturday 19 May 2007, Michiel Boland wrote:
> Hi. Openvpn dies with an illegal instruction error in recent -CURRENTs. (I
> guess currents with the new gcc.)
> Running through a debugger gives:-
> Starting program: /usr/local/sbin/openvpn
> /usr/local/etc/openvpn/openvpn.conf
> Program received signal SIGILL, Illegal instruction.
> 0x0000000800868dd0 in PEM_read_bio_X509 (bp=0x800e4b080, x=0x0,
>      cb=0x439e70 <pem_password_callback>, u=0x0) from /lib/
> (gdb) bt
> #0  0x0000000800868dd0 in PEM_read_bio_X509 (bp=0x800e4b080, x=0x0,
>      cb=0x439e70 <pem_password_callback>, u=0x0) from /lib/
> #1  0x00000008006b14e8 in SSL_CTX_use_certificate_file (ctx=0x800e3d1c0,
>      file=0x800e1a0e8 "/usr/local/etc/openvpn/mboland.crt", type=Variable
> "type" is not available. )
>      at
> /usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/ssl_rsa.c:481 #2 
> 0x000000000043b0f8 in init_ssl ()
> #3  0x0000000000413a04 in init_instance ()
> #4  0x0000000000413ecd in init_instance_handle_signals ()
> #5  0x0000000000422b7f in main ()
> (gdb) disas
> Dump of assembler code for function PEM_read_bio_X509:
> 0x0000000800868dd0 <PEM_read_bio_X509+0>:       ud2a
> End of assembler dump.

Basically everything that depends on openssl is broken. This is because gcc 
4.2 disallows function pointer conversion.

Gcc emits several warnings of this type during the compilation of openssl:
"warning: function called through a non-compatible type
note: if this code is reached, the program will abort"
At these points gcc inserts an abort() call, instead of the intended call 
through a function pointer.

You can find more information here:

Apparently a fix for this is in openssl 0.9.9.

- Pieter de Goeje

More information about the freebsd-current mailing list