svn commit: r232934 - head/contrib/gdb/gdb
Dimitry Andric
dim at FreeBSD.org
Tue Mar 13 19:40:57 UTC 2012
Author: dim
Date: Tue Mar 13 19:40:56 2012
New Revision: 232934
URL: http://svn.freebsd.org/changeset/base/232934
Log:
Pull in a fix (still under GPLv2) for a double free in gdb, leading to
an assert, which can occur if you repeatedly dlopen() and dlclose() a
.so file in a tight loop. This was reported on freebsd-current@ by
Alexandre Martins, with a sample to reproduce the behaviour.
Obtained from: http://sourceware.org/git/?p=gdb.git;a=commit;h=a6f2cbb341520f8e100f4b8305979dd6207a79e8
Modified:
head/contrib/gdb/gdb/target.c
Modified: head/contrib/gdb/gdb/target.c
==============================================================================
--- head/contrib/gdb/gdb/target.c Tue Mar 13 19:18:34 2012 (r232933)
+++ head/contrib/gdb/gdb/target.c Tue Mar 13 19:40:56 2012 (r232934)
@@ -1425,6 +1425,13 @@ target_resize_to_sections (struct target
(*t)->to_sections_end = target->to_sections_end;
}
}
+ /* There is a flattened view of the target stack in current_target,
+ so its to_sections pointer might also need updating. */
+ if (current_target.to_sections == old_value)
+ {
+ current_target.to_sections = target->to_sections;
+ current_target.to_sections_end = target->to_sections_end;
+ }
}
return old_count;
More information about the svn-src-head
mailing list