GIMP

ASan build

Our recommended procedure for ASan builds triggers a undefined reference to `__gxx_personality_v0@@CXXABI_1.3' on bullseye and create new symbols.

Work-around:

cd gimp-2.10.22/
export DEB_BUILD_OPTIONS='sanitize=+address'
sed -i -e 's/^\tdh_makeshlibs/\t-dh_makeshlibs/' debian/rules
time debuild -e ASAN_OPTIONS=detect_leaks=0 -e LIBS=-lstdc++

# some clean-up is necessary before building again
rm config.log po/POTFILES app/tests/gimpdir/pluginrc
mkdir po-tags/

Running GIMP from the build directory when debugging a patch:

# also reference plug-ins from 'common/':
find plug-ins/common/ -maxdepth 1 -type f -executable | while read p; do pg=$(basename $p); mkdir -p plug-ins/$pg; ln -nfs ../../$p plug-ins/$pg/; done
# ASAN_OPTIONS=detect_leaks=0 \
GIMP2_PLUGINDIR=/builddir/gimp-2.10.22/ \
  /builddir/gimp-2.10.22/app/gimp-2.10 CVE-2025-2761.FLI

# Clean-up:
find plug-ins/common/ -maxdepth 1 -type f -executable | while read p; do pg=$(basename $p); rm -f plug-ins/$pg/$pg; rmdir plug-ins/$pg; done