11 Nov
2017
11 Nov
'17
2:30 p.m.
I have the following problem while using boost asio together with boost log and clang 3.9.0. When I want to print an error code for example passed to me by a asio completion handler, my program crashes. This is because the error category points to invalid data. If I put a breakpoint in get_misc_error category which is called upon program startup, the local static error category already contains junk data. When I compile with gcc 5.4.0 this error does not occur. Also if I do not link against boost log everything works fine as well. I use linux, and link all boost libraries dynamically. Boost version is 1.62.0. Would it help if I maybe link boost log statically? Is there anything else I can do?