Your message dated Thu, 30 Jan 2020 21:23:31 -0500
with message-id <87k158bbz0.fsf@paluero>
and subject line Re: Bug#795445: Problem solved in Buster
has caused the Debian Bug report #795445,
regarding gdb: segfault with std::function bound to lambda using type from 
template parameter
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
795445: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795445
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 7.7.1+dfsg-5
Severity: important

Dear Maintainer,

after upgrading to Debian/Stable, serious problems with GDB:
Unable to start with most of the C++11 programs I am working on,
since the debugger crashes right at start.

Could confirm this problem is present on a pristine install of
Debian 8.1, both 64bit and 32bit

I was able to narrow down the problem in one case to a situation,
where a std::function is bound to a lambda, which uses the template
parameter of the enclosing function as argument type. (function / lambda
without this specific twist cause no problems)

See the following demonstration:


----crash_gdb_jessie-2015-08.sh-------------
#/!bin/sh
#
# crash_gdb -- demostrate a Segfault when invoking the debugger
#              observed 8/2015 on Debian/Jessie on X86_64
#              <[email protected]>

CODE=`mktemp`

cat << __END__ | g++ -x c++ - -o$CODE -std=gnu++11  && echo "compiled
successfully to $CODE"

#include <functional>
#include <iostream>
#include <string>

using std::string;
using std::cout;
using std::endl;


template<class ELM>
inline string
activate (ELM& something)
  {
    std::function<string(ELM const&)> lambda = [] (ELM const& val)
                                                  {
                                                    return string(val);
                                                  };
    return lambda(something);
  }


int
main (int, char**)
  {
    cout << activate ("Data") << endl;
    return 0;
  }

__END__


$CODE && echo "executed successfully without debugger"

echo -e "now try to crash the debugger...\n\n"

gdb $CODE -ex run -ex quit

if (($?))
        then echo -e "\n\n\n\n *** Debugger crashed"
        else echo -e "\n\n\n\n +++ Debugger worked, no crash"
fi



-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (900, 'stable'), (650, 'stable'), (500, 'stable-updates'), (95, 
'testing'), (80, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gdb depends on:
ii  libc6         2.19-18
ii  libexpat1     2.1.0-6+deb8u1
ii  liblzma5      5.1.1alpha+20120614-2+b3
ii  libncurses5   5.9+20140913-1+b1
ii  libpython2.7  2.7.9-2
ii  libreadline6  6.3-8+b3
ii  libtinfo5     5.9+20140913-1+b1
ii  zlib1g        1:1.2.8.dfsg-2+b1

Versions of packages gdb recommends:
pn  gdbserver  <none>
pn  libc-dbg   <none>

Versions of packages gdb suggests:
ii  gdb-doc  7.7.1+dfsg-2

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 8.2.1-2+b3

On Thursday, January 30 2020, Ichthyostega wrote:

> Hello back from the future...
>
> just run my probided testcase from Debian/Buster, i.e. with
>
> GNU gdb (Debian 8.2.1-2+b3) 8.2.1
>
>
> ...and it did not crash anymore.
>
> IMHO ticket could be closed

Thanks.  I'm closing this and marking it as fixed in the version you
mentioned.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to