arbitrary long memory chuncks in simix_network. It complicates stuff,
and is hopeless anyway since it has not the full gras_datadesc power.
So, let's stop trying that.
When SIMIX_network_send(), don't pass a pointer's address (void**) as
argument src_buf (which is declared void*). It was dereferenced twice
in SIMIX_network_copy_data() anyway.
The current situation is a bit more sane, even if further cleanups is
needed: I guess that the data argument of SIMIX_network_send() become
useless now, and I didn't cleanup my commit: that's full of useless
FIXMEs.
The motivation to this change was that ruby stacks may move to some
other location in the memory on context switch (to extend it). So,
trying to reuse a pointer to a variable living in the stack after a
switch does not work. This commit kills a "invalid read".
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7199
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
SIMIX_cond_signal(mailbox->cond);
SIMIX_network_send(mailbox->rdv, t_simdata->message_size, t_simdata->rate,
- timeout, &task, sizeof(void*), &t_simdata->comm, task);
+ timeout, task, sizeof(void*), &t_simdata->comm, task);
}
CATCH(e){
comm->dst_proc->smx_host->name, comm->dst_buff,
buff_size);
#endif
- if (buff_size == sizeof(void*)) {
- *(void**)(comm->dst_buff) = *(void**)(comm->src_buff);
- } else {
+
+ xbt_assert1((buff_size == sizeof(void*)), "Cannot copy %d bytes: must be sizeof(void*)",buff_size);
+ //FIXME: cleanup
+// if {
+ *(void**)(comm->dst_buff) = (comm->src_buff);
+/* } else {
memcpy(comm->dst_buff, comm->src_buff, buff_size);
- }
+ }*/
}
/**