Open quant61 opened 3 years ago
within init_encoder()n you're assigning a locally scoped malloc_allocator, instead it must have same life-time of the associated encoder.
mfast::fast_encoder init_encoder(mfast::malloc_allocator *allocator)
{
const mfast::templates_description* descriptions[] = {mfasttest4::description()};
mfast::fast_encoder encoder(allocator);
encoder.include(descriptions);
return encoder;
}
int main()
{
mfast::malloc_allocator allocator;
mfast::fast_encoder encoder = init_encoder(&allocator);
When I try to encode entry with string fields binary gets segmentation fault.
CMakeLists.txt
docker-compose.yml
Dockerfile
test.xml
mfast0.cpp
in host:
When I try
./mfast0
in container I getWith
gdb ./mfast0
I can seeSIGSEGV
after runbt
is