Shared library symbol conflicts - C

318 Views Asked by At

I have an application which is linked to json-c and a third party library. This third party library is linked to libjansson library. So when I execute my application, it crashes due to memory corruption as invalid pointer.

On analysis, both the libraries have json_object_get() API which caused the weird behaviour. If I change this API name from json-c library, app working as expected.

Since I even tried with statically linked libjannson to third party library as well as statically linked json-c to app, it won't crash but still failed json-c calls.

The scenario is given below:

  • app linked to libjson_c_lib.so and libjansson_c_lib.so. Both of these are wrapper libraries on top of json-c and jannson.

  • libjson_c_so linked to libjson-c.so

  • libjansson_c.so linked to libjansson.so.

Could you please someone help here?

0

There are 0 best solutions below