Skip to content

evbuffer_prepend breaks with empty buffers #774

@htuch

Description

@htuch

It looks like evbuffer_prepend doesn't check for empty, whereas evbuffer_prepend_buffer does this explicitly. This breaks in the example at envoyproxy/envoy#6062. Basically, an empty prepend to an immutable chain entry, followed by a evbuffer_remove_buffer and then evbuffer_add does the wrong thing.

We work around this in Envoy in envoyproxy/envoy#6042 by skipping prepend of empty, I think we could do the same in libevent. However, it would be great to get some expert eyes on this, since there may be a more interesting underlying bug that this is tickling.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions