mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-07 14:21:56 +00:00
[LibOS] Fix type of checkpoint's total memory size variable
Checkpoint's total memory size is stored in shim_cp_store::mem_size field. Previously, this field was of type `int`. When a process allocates more than 2GB of memory and then tries to spawn a child, the checkpoint send/receive fails due to int overflow of mem_size. This commit simply changes mem_size type to `size_t`. This is enough to make the bug go away on e.g. a huge Python app with TensorFlow.
This commit is contained in:
@@ -112,7 +112,7 @@ struct shim_cp_store {
|
||||
/* entries of out-of-band data */
|
||||
struct shim_mem_entry* last_mem_entry;
|
||||
int mem_nentries;
|
||||
int mem_size;
|
||||
size_t mem_size;
|
||||
|
||||
/* entries of pal handles to send */
|
||||
struct shim_palhdl_entry* last_palhdl_entry;
|
||||
|
||||
Reference in New Issue
Block a user