|
From: <sv...@va...> - 2012-09-24 21:50:24
|
philippe 2012-09-24 22:50:16 +0100 (Mon, 24 Sep 2012)
New Revision: 13015
Log:
fix n-i-bz report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dar...@ya...)
Modified files:
trunk/NEWS
trunk/massif/ms_main.c
Modified: trunk/NEWS (+1 -1)
===================================================================
--- trunk/NEWS 2012-09-24 22:37:02 +01:00 (rev 13014)
+++ trunk/NEWS 2012-09-24 22:50:16 +01:00 (rev 13015)
@@ -32,8 +32,8 @@
305948 [390] ppc64: code generation for ShlD64 / ShrD64 asserts
306054 [390] s390x: Condition code computation for convert-to-int/logical
307155 [390] filter_gdb should filter out syscall-template.S T_PSEUDO
+n-i-bz [390] report error for vgdb snapshot requested before execution
-
Release 3.8.1 (19 September 2012)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.8.1 is a bug fix release. It fixes some assertion failures in 3.8.0
Modified: trunk/massif/ms_main.c (+9 -1)
===================================================================
--- trunk/massif/ms_main.c 2012-09-24 22:37:02 +01:00 (rev 13014)
+++ trunk/massif/ms_main.c 2012-09-24 22:50:16 +01:00 (rev 13015)
@@ -2392,9 +2392,17 @@
{
Snapshot snapshot;
+ if (!clo_pages_as_heap && !have_started_executing_code) {
+ // See comments of variable have_started_executing_code.
+ VG_(gdb_printf)
+ ("error: cannot take snapshot before execution has started\n");
+ return;
+ }
+
clear_snapshot(&snapshot, /* do_sanity_check */ False);
take_snapshot(&snapshot, Normal, get_time(), detailed);
- write_snapshots_to_file ((filename == NULL) ? (Char*) "massif.vgdb.out" : filename,
+ write_snapshots_to_file ((filename == NULL) ?
+ (Char*) "massif.vgdb.out" : filename,
&snapshot,
1);
delete_snapshot(&snapshot);
|