FTR the cflags in Fedora are: […] And ldflags:
Ah-ah! We got a winner. If I build Geany with those flags (minus the `-spec` parameters that obviously don't work on my Debian): ```shell $ export LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now" $ export CFLAGS="-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" $ export CXXFLAGS="$CFLAGS" $ ./autogen.sh --prefix=/tmp/_install […] $ make -j4 install […] $ /tmp/_install/bin/geany -c /tmp/_conf /usr/include/c++/8/bits/stl_vector.h:950: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>; std::vector<_Tp, _Alloc>::const_reference = const unsigned char&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. ```
Without testing further, my money would go on `-D_GLIBCXX_ASSERTIONS`.