[PATCH] Fix bug 59586

Roman Gareev gareevroman@gmail.com
Sat Mar 8 11:22:00 GMT 2014


Sorry, an error occurred somewhere. Below is an attachment with the
patch and ChangeLog entry.

> This patch fixes the following bug:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59586.
> The segfault is caused by NULL arguments passed to compute_deps by
> loop_level_carries_dependences.
> This causes an assignment of NULL values to the no_source parameters
> of compute_deps.
> They are passed to subtract_commutative_associative_deps and dereferenced.
>
> However, this NULL arguments are appropriate for the algorithm used
> in loop_level_carries_dependences. It uses compute_deps
> for finding RAW, WAR and WAW dependences of all basic blocks
> in the body of the given loop. Subsequently, it tries to
> determine presence of these dependences at the given level.
> Therefore it maps the relation of the dependences to the relation
> of the corresponding time-stamps and intersects the result with
> the relation in which all the inputs before the DEPTH occur at the
> same time as the output, and the input at the DEPTH occurs before output.
> If the intersection is not empty, some dependences are carried
> by the DEPTH we currently check and the loop is consequently not parallel.
>
> This patch tries to avoid the problem by addition to
> subtract_commutative_associative_deps
> of NULL checking of the no_source statements.
>
> Tested x86_64-unknown-linux-gnu, applying to 4.8.3 and trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 4400 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140308/e5384ca7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog_entry
Type: application/octet-stream
Size: 453 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140308/e5384ca7/attachment-0001.obj>


More information about the Gcc-patches mailing list