<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Arrays should not be out-of-bound accessed. (llvm-project/llvm/lib/IR/AutoUpgrade.cpp:line 977)"
href="https://bugs.llvm.org/show_bug.cgi?id=46885">46885</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Arrays should not be out-of-bound accessed. (llvm-project/llvm/lib/IR/AutoUpgrade.cpp:line 977)
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Core LLVM classes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>info@ustchcs.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Arrays should not be out-of-bound accessed.
The size of array 'Indices' is 4 (Line:975), 'i' ranges from 0 to 'NumElts' and
'NumElts' is lower than 8 (not 4). So in line 977, 'Indices[i]' could result in
out-of-bound access.
(commit: e3546c78cabfbf670391a57766872f0a8e28a423)
llvm-project/llvm/lib/IR/AutoUpgrade.cpp:
974 if (NumElts < 8) {
975 int Indices[4];
976 for (unsigned i = 0; i != NumElts; ++i)
977 Indices[i] = i;
978 Mask = Builder.CreateShuffleVector(Mask, Mask,
979 makeArrayRef(Indices, NumElts),
980 "extract");
981 }
982
983 return Mask;
984 }
Reported by: Ustchcs Toolsets Bugfinder
(bugfinder-4.5: Arrays should not be out-of-bound accessed.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>