Commit 04a7c3c
authored
Merge pull request #12729 from gbtitus/ugni-overlong-memcpy
Fix a memcpy() that used the wrong size.
(Reviewed by @ronawho.)
While distributing all the nodes' initial memory region tables around the
job, when copying each node's initial table entries from the allgathered
data to our map we were copying enough bytes for the total size of the
entire table, including its header and all the entries allocated for it.
That's way too many; the target has that much room, by definition, but
the source doesn't have that many valid bytes. We should instead copy
just enough bytes to cover the maximum number of table entries that are
in use on any node at this point. Only that many were transmitted in
the allgather.
This resolves Cray/chapel-private#91.1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
2650 | | - | |
| 2650 | + | |
2651 | 2651 | | |
2652 | 2652 | | |
2653 | 2653 | | |
| |||
0 commit comments