qehgt/myrpc — Issue #3: core dump
Author: schouwla
Created: 2012-02-05 09:01:15+00:00
State: open

I have a core dump when I call the tests project, at the place where run_client_test calls cli.call.
What is the best way to setup the build environment?

try {
i = cli.call("add", 12).get(); <----- here
}
catch (const std::exception& e)
{
printf("internal catch: %s\n", e.what());
}

void* msgpack_zone_malloc_expand(msgpack_zone* zone, size_t size)
{
msgpack_zone_chunk_list* const cl = &zone->chunk_list;

size_t sz = zone->chunk_size;

while(sz < size) {
sz *= 2;
}

msgpack_zone_chunk* chunk = (msgpack_zone_chunk*)malloc(
sizeof(msgpack_zone_chunk) + sz);

char* ptr = ((char*)chunk) + sizeof(msgpack_zone_chunk);

chunk->next = cl->head; <------ crashes here
cl->head = chunk;
cl->free = sz - size;
cl->ptr = ptr + size;

return ptr;
}

My platform is Windows 7 64 bit (using 32 only ... i think), Visual Studio 2010 SP1, Boost 1.48, MsgPack 0.5.4