This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/20037] Detected Use-After-Free Error


https://sourceware.org/bugzilla/show_bug.cgi?id=20037

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
I guess you're using Python3.  I have a patch for a use-after-free in:

    #1 0x502bb5 in _initialize_python (/usr/bin/gdb+0x502bb5)

that I had noticed with Valgrind.

The problem is doing this:

  oldloc = setlocale (LC_ALL, NULL);
  setlocale (LC_ALL, "");

  ...
  setlocale (LC_ALL, oldloc);


I.e., the second setlocale call frees 'oldloc'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]