There is a bug when the AMQP header table has a nested table that is empty (0 entries). The exception std::bad_alloc() is thrown.
This is the line:
|
case AMQP_FIELD_KIND_TABLE: |
|
new_value.value.table = CopyTableInner(value.value.table, pool); |
Then this is called and it throws the exception:
|
amqp_table_t TableValueImpl::CopyTableInner(const amqp_table_t &table, |
|
amqp_pool_t &pool) { |
|
amqp_table_t new_table; |
|
|
|
new_table.num_entries = table.num_entries; |
|
new_table.entries = (amqp_table_entry_t *)amqp_pool_alloc( |
|
&pool, sizeof(amqp_table_entry_t) * table.num_entries); |
|
if (NULL == new_table.entries) { |
|
throw std::bad_alloc(); |
I experience this by trying to consume the celery v5.3.1 event.

The stamps is a table that has no entries.
There is a bug when the AMQP header table has a nested table that is empty (0 entries). The exception
std::bad_alloc()is thrown.This is the line:
SimpleAmqpClient/src/TableImpl.cpp
Lines 353 to 354 in 6369b99
Then this is called and it throws the exception:
SimpleAmqpClient/src/TableImpl.cpp
Lines 306 to 314 in 6369b99
I experience this by trying to consume the celery

v5.3.1event.The
stampsis a table that has no entries.