Commits

Nathan Hjelm committed 439cc4b

assert that btl segments fit in the space provided by rdma_segs

  • Participants
  • Parent commits 975600e

Comments (0)

Files changed (6)

File ompi/mca/pml/bfo/pml_bfo_recvreq.c

     /* lookup bml datastructures */
     bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_bml; 
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* allocate/initialize a fragment */
     memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);
 

File ompi/mca/pml/bfo/pml_bfo_sendreq.c

         orte_errmgr.abort(-1, NULL);
     }
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* setup fragment */
     memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);
 

File ompi/mca/pml/csum/pml_csum_recvreq.c

     /* lookup bml datastructures */
     bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_bml; 
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* allocate/initialize a fragment */
     memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);
 

File ompi/mca/pml/csum/pml_csum_sendreq.c

         orte_errmgr.abort(-1, NULL);
     }
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* setup fragment */
     memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);
 

File ompi/mca/pml/ob1/pml_ob1_recvreq.c

     /* lookup bml datastructures */
     bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_bml; 
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* allocate/initialize a fragment */
     memcpy (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);
 

File ompi/mca/pml/ob1/pml_ob1_sendreq.c

         orte_errmgr.abort(-1, NULL);
     }
 
+    assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs));
+
     /* setup fragment */
     memcpy (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt);