From a7eafe040faedcc0987b01b878672faec769d3f7 Mon Sep 17 00:00:00 2001 From: degomme Date: Wed, 15 Feb 2017 02:07:06 +0100 Subject: [PATCH] Store this size in a fixed sized, as potentially this could overflow --- src/smpi/private.h | 2 +- src/smpi/smpi_bench.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/smpi/private.h b/src/smpi/private.h index a2c125607f..b2ea6816cc 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -412,7 +412,7 @@ extern XBT_PRIVATE double smpi_cpu_threshold; extern XBT_PRIVATE double smpi_host_speed; extern XBT_PRIVATE bool smpi_privatize_global_variables; extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable -extern XBT_PRIVATE int smpi_size_data_exe; //size of the data+bss segment of the executable +extern XBT_PRIVATE uint64_t smpi_size_data_exe; //size of the data+bss segment of the executable XBT_PRIVATE void smpi_switch_data_segment(int dest); XBT_PRIVATE void smpi_really_switch_data_segment(int dest); diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index a4f05211ca..41171c436d 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -83,7 +83,7 @@ double smpi_host_speed; int smpi_loaded_page = -1; char* smpi_start_data_exe = nullptr; -int smpi_size_data_exe = 0; +uint64_t smpi_size_data_exe = 0; bool smpi_privatize_global_variables; double smpi_total_benched_time = 0; smpi_privatisation_region_t smpi_privatisation_regions; @@ -730,7 +730,7 @@ void smpi_initialize_global_memory_segments() smpi_get_executable_global_size(); - XBT_DEBUG ("bss+data segment found : size %d starting at %p", smpi_size_data_exe, smpi_start_data_exe ); + XBT_DEBUG ("bss+data segment found : size %zu starting at %p", smpi_size_data_exe, smpi_start_data_exe ); if (smpi_size_data_exe == 0){//no need to switch smpi_privatize_global_variables=false; -- 2.20.1