Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 00/40] add cleanup checker and fix cleanup bugs
@ 2013-05-09 18:47 Tom Tromey, Tom Tromey
  2013-05-09 18:48 ` [PATCH 01/40] add the cleanup checker Tom Tromey, Tom Tromey
                   ` (42 more replies)
  0 siblings, 43 replies; 74+ messages in thread
From: Tom Tromey, Tom Tromey @ 2013-05-09 18:47 UTC (permalink / raw)
  To: gdb-patches

This series adds a cleanup checker and then fixes most of the bugs it
notices.

The series as a whole was built and regression-tested on x86-64 Fedora
18.  However, there are a couple of patches that I could not test;
e.g., the machoread.c patch.  I would appreciate it if someone could
try these on their machine.  The branch is archer.git tromey/cleanup-checker.

In most cases the patches are pretty obvious.  I kept them short for
ease of reading.

The cleanup checker itself is described in patch #1.  This patch also
describes some of the 

After this series, there are still some cleanup-related bugs noticed
by the checker.  One of these (in dwarf2read.c) is a false report --
the checker is not perfect and there was no nice workaround here.


The remaining errors are:

disasm.c has some spaghetti code; I didn't try to untangle it to see if
there is a bug here or not:

../../archer/gdb/disasm.c: In function ‘do_mixed_source_and_assembly’:
../../archer/gdb/disasm.c:334:16: error: destructor call with unknown argument [-fpermissive]
../../archer/gdb/disasm.c:335:16: error: destructor call with unknown argument [-fpermissive]
../../archer/gdb/disasm.c:344:1: error: cleanup stack is not empty at return [-fpermissive]
../../archer/gdb/disasm.c:212:19: note: leaked cleanup
../../archer/gdb/disasm.c:211:19: note: leaked cleanup
../../archer/gdb/disasm.c:334:16: error: destructor call with unknown argument [-fpermissive]
../../archer/gdb/disasm.c:335:16: error: destructor call with unknown argument [-fpermissive]


infrun.c bugs, reported to bugzilla:

../../archer/gdb/infrun.c: In function ‘normal_stop’:
../../archer/gdb/infrun.c:6171:1: error: cleanup stack is not empty at return [-fpermissive]
../../archer/gdb/infrun.c:5930:18: note: leaked cleanup
../../archer/gdb/infrun.c:5921:19: note: leaked cleanup
../../archer/gdb/infrun.c: In function ‘keep_going’:
../../archer/gdb/infrun.c:5728:8: error: cleanup stack is not empty at return [-fpermissive]
../../archer/gdb/infrun.c:5669:19: note: leaked cleanup


I wasn't sure what to do about this -- there are many return paths
here that don't deal with the cleanups:

../../archer/gdb/record-full.c: In function ‘record_full_wait_1’:
../../archer/gdb/record-full.c:1492:1: error: cleanup stack is not empty at return [-fpermissive]


Likewise:

../../archer/gdb/record-btrace.c: In function ‘record_btrace_insn_history’:
../../archer/gdb/record-btrace.c:336:1: error: cleanup stack is not empty at return [-fpermissive]
../../archer/gdb/record-btrace.c:274:17: note: leaked cleanup
../../archer/gdb/record-btrace.c: In function ‘record_btrace_call_history’:
../../archer/gdb/record-btrace.c:565:1: error: cleanup stack is not empty at return [-fpermissive]
../../archer/gdb/record-btrace.c:503:17: note: leaked cleanup


^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2013-06-18 15:41 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 18:47 [PATCH 00/40] add cleanup checker and fix cleanup bugs Tom Tromey, Tom Tromey
2013-05-09 18:48 ` [PATCH 01/40] add the cleanup checker Tom Tromey, Tom Tromey
2013-05-17 16:15   ` Tom Tromey
2013-05-09 18:49 ` [PATCH 02/40] some cleanup checker fixes Tom Tromey, Tom Tromey
2013-05-09 18:49 ` [PATCH 04/40] fix cleanups in som_symtab_read Tom Tromey, Tom Tromey
2013-05-09 18:49 ` [PATCH 05/40] fix cleanup buglet in ada-lang.c Tom Tromey, Tom Tromey
2013-05-30 16:31   ` Tom Tromey
2013-05-09 18:49 ` [PATCH 03/40] fix print_command_1 Tom Tromey, Tom Tromey
2013-05-09 18:49 ` [PATCH 06/40] remove erroneous return from setup_user_args Tom Tromey, Tom Tromey
2013-05-09 18:50 ` [PATCH 08/40] fix up cleanup handling in internal_vproblem Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 09/40] cleanup fixes for remote-mips.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 18/40] fix py-breakpoint.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 17/40] simplify cli-logging.c for analysis Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 12/40] fix cleanup handling in m32r_load Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 10/40] cleanup fixes for inf-ptrace.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 24/40] fix mipsread.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 13/40] fix cleanup handling in macho_symfile_read Tom Tromey, Tom Tromey
2013-06-03 13:32   ` Joel Brobecker
2013-06-03 16:09     ` Tom Tromey
2013-06-04 13:30       ` Joel Brobecker
2013-06-11 10:21         ` [patch/Darwin] Fix cleanup leak in machoread.c:macho_symfile_read Joel Brobecker
2013-06-18 15:42           ` Tom Tromey
2013-05-09 18:51 ` [PATCH 23/40] fix one bug in symfile.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 20/40] fix py-prettyprint.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 22/40] fix symtab.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 11/40] fix list_available_thread_groups Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 15/40] make a cleanup unconditionally in tracepoint.c Tom Tromey, Tom Tromey
2013-05-30  9:23   ` Yao Qi
2013-05-30 13:23     ` Tom Tromey
2013-05-09 18:51 ` [PATCH 19/40] fix py-frame.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 16/40] fix varobj.c Tom Tromey, Tom Tromey
2013-05-09 18:51 ` [PATCH 14/40] fix two buglets in breakpoint.c Tom Tromey, Tom Tromey
2013-05-13  2:33   ` Yao Qi
2013-05-13 14:58     ` Tom Tromey
2013-05-13 16:44     ` Tom Tromey
2013-05-14  0:37       ` Yao Qi
2013-05-17 16:19       ` Tom Tromey
2013-05-09 18:51 ` [PATCH 21/40] fix py-value.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 26/40] fix top.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 31/40] fix source.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 33/40] fix mi-cmd-stack.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 29/40] fix in solib-aix.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 28/40] use explicit returns to avoid checker confusion Tom Tromey, Tom Tromey
2013-05-24  0:51   ` asmwarrior
2013-05-24  1:30     ` Tom Tromey
2013-05-24 15:41       ` Tom Tromey
2013-05-26 11:21         ` asmwarrior
2013-05-09 18:52 ` [PATCH 27/40] fix cp-namespace.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 32/40] fix dbxread.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 25/40] fix one bug in stabsread.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 30/40] fix linux-thread-db.c Tom Tromey, Tom Tromey
2013-05-09 18:52 ` [PATCH 36/40] introduce dangling_cleanup attribute and change source to use it Tom Tromey, Tom Tromey
2013-05-17 16:17   ` Tom Tromey
2013-05-09 18:52 ` [PATCH 35/40] fix mi-cmd-var.c Tom Tromey, Tom Tromey
2013-05-17 16:16   ` Tom Tromey
2013-05-09 18:52 ` [PATCH 34/40] fix cli-script.c Tom Tromey, Tom Tromey
2013-05-09 18:53 ` [PATCH 39/40] fix compile_rx_or_error Tom Tromey, Tom Tromey
2013-05-13  2:53   ` Yao Qi
2013-05-13 14:59     ` Tom Tromey
2013-05-30 17:39       ` Tom Tromey
2013-05-09 18:53 ` [PATCH 40/40] fix up xml-support.c Tom Tromey, Tom Tromey
2013-05-30 17:41   ` Tom Tromey
2013-05-09 18:53 ` [PATCH 37/40] fix breakpoint_1 Tom Tromey, Tom Tromey
2013-05-17 16:18   ` Tom Tromey
2013-05-09 18:53 ` [PATCH 38/40] some fixes to infrun.c Tom Tromey, Tom Tromey
2013-05-17 16:21   ` Tom Tromey
2013-05-09 19:45 ` [PATCH 07/40] fix linespec bug noticed by the checker Tom Tromey, Tom Tromey
2013-05-09 21:21 ` [PATCH 00/40] add cleanup checker and fix cleanup bugs Phil Muldoon
2013-05-10 14:27   ` Tom Tromey
2013-05-10  8:23 ` Joel Brobecker
2013-05-10 14:34   ` Tom Tromey
2013-05-11 10:41     ` Joel Brobecker
2013-05-14 19:04       ` Tom Tromey
2013-05-30 16:17 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox