[polly] r295292 - [FIX] Fix the typo in ScheduleOptimizer.cpp.
Roman Gareev via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 01:21:17 PST 2017
2017-02-16 14:19 GMT+05:00 Michael Kruse <llvm-commits at meinersbur.de>:
> This is not a 'typo', but a use-after-free.
OK.
> Michael
>
> 2017-02-16 8:04 GMT+01:00 Roman Gareev via llvm-commits
> <llvm-commits at lists.llvm.org>:
>> Author: romangareev
>> Date: Thu Feb 16 01:04:41 2017
>> New Revision: 295292
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=295292&view=rev
>> Log:
>> [FIX] Fix the typo in ScheduleOptimizer.cpp.
>>
>> Modified:
>> polly/trunk/lib/Transform/ScheduleOptimizer.cpp
>>
>> Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
>> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=295292&r1=295291&r2=295292&view=diff
>> ==============================================================================
>> --- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
>> +++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Thu Feb 16 01:04:41 2017
>> @@ -775,17 +775,18 @@ static bool containsOnlyMatMulDep(__isl_
>> auto *Deltas = isl_map_deltas(isl_union_map_extract_map(Dep, Space));
>> isl_union_map_free(Dep);
>> int DeltasDimNum = isl_set_dim(Deltas, isl_dim_set);
>> - isl_set_free(Deltas);
>> for (int i = 0; i < DeltasDimNum; i++) {
>> auto *Val = isl_set_plain_get_val_if_fixed(Deltas, isl_dim_set, i);
>> Pos = Pos < 0 && isl_val_is_one(Val) ? i : Pos;
>> if (isl_val_is_nan(Val) ||
>> !(isl_val_is_zero(Val) || (i == Pos && isl_val_is_one(Val)))) {
>> isl_val_free(Val);
>> + isl_set_free(Deltas);
>> return false;
>> }
>> isl_val_free(Val);
>> }
>> + isl_set_free(Deltas);
>> if (DeltasDimNum == 0 || Pos < 0)
>> return false;
>> return true;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
--
Cheers, Roman Gareev.
More information about the llvm-commits
mailing list