[FFmpeg-devel] ABI break in 4.3
Jan Engelhardt
jengelh at inai.de
Sun Jul 5 13:54:17 EEST 2020
On Sunday 2020-07-05 12:06, Tomas Härdin wrote:
>
>> Or, summarized: A program may have been built with 4.3 but is combined
>> with 4.2.3 at runtime, then this can happen:
>>
>> a = avcodec_dct_alloc(); // allocates 896
>> #ifdef HAVE_STRUCT_AVDCT_GET_PIXELS_UNALIGNED
>> a->get_pixels_unaligned = ffunc; // boom accessing byte ~952
>> #endif
>
>"Doctor it hurts when I do this!"
The application of this saying is short-sighted. It confounds basic
exercise of features with overuse of said features. For lack of a
better analogy, moving a leg normally _ought_ not to hurt in healthy
humans. What is seen as "normal" is indeed situation-dependent, but
the only other way to look at it is that ffmpeg is a disabled entity
with special needs.
>Downgrading to a .so file with a lower minor version number than the
>program is built against can never be expected to work. Else we
>couldn't add new functions without a major bump.
Then you are doing it wrong. If one tries to run a contemporary
program on an older distribution, which certainly has an older glibc,
it refuses to run - which is much preferable to a crash at an
arbitrary point down the line.
It requires the use ELF symbol versions -- which ffmpeg fails to
do properly. Between 4.2.3 and 4.3,
avpriv_mpeg4audio_get_config2@@LIBAVCODEC_58
which is wrong. It should have been
avpriv_mpeg4audio_get_config2@@LIBAVCODEC_58.91
Then the runtime linker ld-linux.so would have caught the problem
at startup, because then, a program built with 4.3 would have a
minimum requirement on elfsymver "58.91", and *not just* "58".
More information about the ffmpeg-devel
mailing list