Skip to content

Ember Tricount - Segmentation fault #2276

@AKKamath

Description

@AKKamath

With certain configurations, I'm getting a segmentation fault in the Tricount motif.
I've isolated the error to this line:
https://github.com/sstsimulator/sst-elements/blob/d723ad035dd83c7a1957c9a9b90b7fc73733c7d8/src/sst/elements/ember/mpi/motifs/embertricount.cc#L352C9-L352C9

Right now the code is:
if (i > taskStarts_.size() || j > taskStarts_.size() ) skip = true;

I believe this should instead be:
if (i >= taskStarts_.size() - 1 || j >= taskStarts_.size() - 1 ) skip = true;

This is because the line 361 has the following accesses:

first_i = taskStarts_[i];      // first vertex of partition i
last_i  = taskStarts_[i + 1];  // first vertex of partition i + 1

If i is equal to taskStarts_.size() - 1, then taskStarts_[i + 1] is an out-of-bounds access.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions