[gnutls-devel] GnuTLS 3.2.15 SIGSEGV in _gnutls_buffer_append_data

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Dec 16 13:11:51 CET 2014


On Tue, 2014-12-16 at 13:49 +0200, Jaak Ristioja wrote:
> Hello!
> 
> Yesterday I found myself debugging a SIGSEGV in an application which
> calls gnutls_record_send() on 7-byte and 16384-byte buffers during a
> short amount of time (the total size of data the application must pass
> to gnutls_record_send() exceeds 2,5 GiB). I think that GnuTLS is mostly
> corked during these operations. I got the following backtrace in GDB:

That looks like a memory corruption. For these types of errors valgrind
may given more reliable information than gdb. Could you have a run with
valgrind?

> Can anybody help me understand how a gnutls_buffer_st,
> _gnutls_buffer_append_data and related functions should work, or why
> this crash happens? This code in lib/gnutls_str.[ch] could use a few
> more comments.

The idea is to have a buffer where data can be appended easily and
quickly.

> PS: A few small ideas for optimizing the current
> _gnutls_buffer_append_data function:

Will check and reply later.

regards,
Nikos





More information about the Gnutls-devel mailing list