A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix for clang 14: new check was added against substracting from a potential nullptr.
[simgrid.git]
/
src
/
mc
/
remote
/
AppSide.cpp
diff --git
a/src/mc/remote/AppSide.cpp
b/src/mc/remote/AppSide.cpp
index
3798706
..
eeee309
100644
(file)
--- a/
src/mc/remote/AppSide.cpp
+++ b/
src/mc/remote/AppSide.cpp
@@
-107,7
+107,7
@@
void AppSide::handle_actor_enabled(const s_mc_message_actor_enabled_t* msg) cons
{
bool res = mc::actor_is_enabled(kernel::actor::ActorImpl::by_pid(msg->aid));
s_mc_message_int_t answer{MessageType::ACTOR_ENABLED_REPLY, res};
-
channel_.send(answer
);
+
xbt_assert(channel_.send(answer) == 0, "Could not send ACTOR_ENABLED_REPLY"
);
}
#define assert_msg_size(_name_, _type_) \
@@
-256,7
+256,7
@@
void AppSide::ignore_heap(void* address, std::size_t size) const
message.fragment = -1;
heap->heapinfo[message.block].busy_block.ignore++;
} else {
- message.fragment =
(ADDR2UINT(address) % BLOCKSIZE) >> heap->heapinfo[message.block].type
;
+ message.fragment =
address ? (ADDR2UINT(address) % BLOCKSIZE) >> heap->heapinfo[message.block].type : 0
;
heap->heapinfo[message.block].busy_frag.ignore[message.fragment]++;
}