This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] Fix filename generation for out of memory dumps.
- From: David Daney <david dot s dot daney at gmail dot com>
- To: java-patches at gcc dot gnu dot org
- Cc: David Daney <ddaney at caviumnetworks dot com>
- Date: Mon, 27 Jul 2009 21:18:49 -0700
- Subject: [PATCH] Fix filename generation for out of memory dumps.
As noted here:
http://gcc.gnu.org/ml/java/2009-07/msg00067.html
The filename generation in the out of memory dumps is a bit screwed up.
This patch restores it to its intended state.
Bootstrapped and regression tested on x86_64-pc-linux-gnu with no
regressions.
OK to commit?
2009-07-28 David Daney <ddaney@caviumnetworks.com>
* gnu/gcj/util/natGCInfo.cc (nomem_handler): Use oomDumpName as
dump file name base.
Index: gnu/gcj/util/natGCInfo.cc
===================================================================
--- gnu/gcj/util/natGCInfo.cc (revision 150090)
+++ gnu/gcj/util/natGCInfo.cc (working copy)
@@ -407,7 +407,7 @@ nomem_handler(size_t size)
if (oomDumpName)
{
char temp[strlen(oomDumpName) + 20];
- sprintf(temp, "%s%03d", temp, GC_dump_count++);
+ sprintf(temp, "%s%03d", oomDumpName, GC_dump_count++);
printf("nomem_handler(%zd) called\n", size);
gc_ok--;
GC_enumerator x(temp);