ABI Breakage

Domenico Andreoli, the Debian curl and libcurl maintainer posted to the curl-library list about the recent libcurl soname bump and the related issue of ABI breakage.

I responded, explaining my view on why the soname bump from 3 to 4 was valid, but I’ve also gone back in my mail archives and checked out a private discussion I had with Bjorn Reese over this subject a long time ago and I feel it is about time it hits the air.

An ABI breakage occurs when one or more of the following changes are made

Functions:

  • Change function names
  • Remove existing functions
  • Change parameters
  • Change behavior
  • Change undefined behavior
  • Add dependence on other functions (e.g. A() must be called before B())

Data structures:

  • Change the order of elements
  • Add elements
  • Remove elements
  • Change the data type or size
  • Change alignment
  • Change element values (e.g. change bits in flag variables)

Global variables:

  • Change variable names or types
  • Remove variables

Update: Dan Fandrich posted on the curl-library list and mentioned Mike Hearn’s great related page: Writing shared libraries.