[pacman-dev] Bug in libalpm: sizeof(off_t)

Jeremy Heiner scalaprotractor at gmail.com
Wed Dec 11 11:42:36 EST 2013


On Wed, Dec 11, 2013 at 11:14 AM, Allan McRae <allan at archlinux.org> wrote:
> How about #5...

Remember: libalpm is a .so, and sizeof(off_t) is something the app
writer is free to choose (on many systems). The problem is that the
choice made by libalpm (by ./configure) gets baked into the .so ABI,
and if the app writer chooses differently they get SEGVs.

The macro approach works because the macro gets evaluated in the app
compile context, so it sees what the app writer chose. Without knowing
both what libalpm ./configure chose and what the app writer chose you
can't detect when they differ.


More information about the pacman-dev mailing list