emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/igc f24fd779881 3/6: Tighter bounds for the dumped hot region


From: Gerd Moellmann
Subject: scratch/igc f24fd779881 3/6: Tighter bounds for the dumped hot region
Date: Thu, 16 May 2024 04:44:58 -0400 (EDT)

branch: scratch/igc
commit f24fd77988118523796ea053c76f18c94aa60b7b
Author: Helmut Eller <eller.helmut@gmail.com>
Commit: Gerd Möllmann <gerd@gnu.org>

    Tighter bounds for the dumped hot region
    
    * src/pdumper.c (pdumper_load): Exclude the header and the discardable
    part.
---
 src/pdumper.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pdumper.c b/src/pdumper.c
index 2437a70f0a8..00bb7dd8db8 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5956,8 +5956,11 @@ pdumper_load (const char *dump_filename, char *argv0)
   dump_public.end = dump_public.start + dump_size;
 
 #ifdef HAVE_MPS
-  void *hot_start = (void *) dump_base;
-  void *hot_end = (void *) (dump_base + adj_discardable_start);
+  size_t aligned_header_size
+    = ((sizeof (struct dump_header) + DUMP_ALIGNMENT - 1)
+       & ~(DUMP_ALIGNMENT - 1));
+  void *hot_start = (void *) (dump_base + aligned_header_size);
+  void *hot_end = (void *) (dump_base + header->discardable_start);
 #endif
 
   dump_do_all_dump_reloc_for_phase (header, dump_base, EARLY_RELOCS);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]