This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values
ClosedPublic

Authored by rcraik on Sep 19 2017, 12:17 PM.

Details

Summary

When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec):

  1. The iteration vector vec contains less than n items
  2. The iteration vector vec contains a variable that is not a loop control variable

This patch addresses both of these issues.

Diff Detail

Event Timeline

rcraik created this revision.Sep 19 2017, 12:17 PM
This revision is now accepted and ready to land.Sep 19 2017, 1:17 PM
This revision was automatically updated to reflect the committed changes.