Setting the client name with the C library causes a crash when closing the context because it tries to free a pointer that hasn't been heap-allocated. I fixed it by copying the name to a new buffer.
The issue can be reproduced with sample binaries:
$ AERON_CLIENT_NAME=oops ./binaries/cpong
Subscribing Ping at channel aeron:udp?endpoint=localhost:20123 on Stream ID 1002
Publishing Pong at channel aeron:udp?endpoint=localhost:20124 on Stream ID 1003
Subscription channel status 1
Publication channel status 1
^Cmunmap_chunk(): invalid pointer
Aborted (core dumped)
Another option would be to just not free, but I think holding it in a new buffer is more robust and consistent with aeron_context_set_dir().
Setting the client name with the C library causes a crash when closing the context because it tries to free a pointer that hasn't been heap-allocated. I fixed it by copying the name to a new buffer.
The issue can be reproduced with sample binaries:
Another option would be to just not free, but I think holding it in a new buffer is more robust and consistent with
aeron_context_set_dir()
.