What does “BUS_ADRALN - Invalid address alignment” error means?

前端 未结 4 2295
忘掉有多难
忘掉有多难 2021-02-15 11:02

We are on HPUX and my code is in C++. We are getting

BUS_ADRALN - Invalid address alignment

in our executable on a function call.

4条回答
  •  悲哀的现实
    2021-02-15 11:48

    Most of these issues are caused by multiple upstream dependencies linking to different versions of the same library.

    For example, both the gnustl and stlport provide distinct implementations of the C++ standard library. If you compile and link against gnustl, while one of your dependencies was compiled and linked against stlport, then you will each have a different implementation of standard functions and classes. When your program is launched, the dynamic linker will attempt to resolve all of the exported symbols, and will discover known symbols at incorrect offsets, resulting in the BUS_ADRALN signal.

提交回复
热议问题