Inconsistency detected by ld.so: dl-deps.c when dlopen .so, built with --filter option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Having libFilter.so built with --filter=
Running prog-bug, which contains dlopen(
The issue is reproducible on Ubuntu 16.04, 18.04, 20.04, although the dl-deps.c line number may be different.
The attached file contains full C source code, the binaries, and the build script.
To reproduce:
1) Unzip and cd to the folder.
2) Define LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH=.
3) Run correct executable prog-ok, not having dlopen call, behaves as expected.
$ prog-ok
4) Run prog-bug, which demonstrates the issue, having dlopen, and produces the above error.
$ prog-bug
Optionally you may rebuild the binaries, using _build.sh script.
The same error appears running:
$ ldd libFilter.so
I am using Ubuntu 18.04.6 LTS with libc6 v2.27-3ubuntu1.4.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libc6 2.27-3ubuntu1.4
ProcVersionSign
Uname: Linux 4.15.0-162-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.27
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Nov 30 17:52:07 2021
Dependencies:
gcc-11-base 11.1.0-
libc6 2.27-3ubuntu1.4
libgcc-s1 11.1.0-
libgcc1 1:11.1.
InstallationDate: Installed on 2020-05-03 (576 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: glibc
UpgradeStatus: No upgrade log present (probably fresh install)
This bug has easy fix: remove line 549 (v2.27) in dl-deps.c, saying map->l_ searchlist. r_list[ 0] == map);
assert(
I checked all the glibc sources after v2.27, which runs on my Ubuntu 18.04. I see that this bug is fixes in v2.32.
It would be nice to fix it for Ubuntu 18.04 and 20.04 - easy one line fix.