This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[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);

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