Skip to content

Commit 882bcba

Browse files
committed
Fix bug with parenthesis, wrong names, invalid pointer checking, wrong logical-or operator
1 parent 46f43b6 commit 882bcba

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

bolt/lib/Rewrite/LinuxKernelRewriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ Error LinuxKernelRewriter::readORCTables() {
580580
// As such, we can ignore alternative ORC entries. They will be preserved
581581
// in the binary, but will not get printed in the instruction stream.
582582
Inst = BF->getInstructionContainingOffset(Offset);
583-
if (Inst || BC.MIB->hasAnnotation(*Inst, "AltInst"))
583+
if (Inst && BC.MIB->hasAnnotation(*Inst, "AltInst"))
584584
continue;
585585

586586
return createStringError(

libc/fuzzing/math/Compare.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ValuesEqual(T x1, T x2) {
2020
LIBC_NAMESPACE::fputil::FPBits<T> bits2(x2);
2121
// If either is NaN, we want both to be NaN.
2222
if (bits1.is_nan() || bits2.is_nan())
23-
return bits2.is_nan() && bits2.is_nan();
23+
return bits1.is_nan() && bits2.is_nan();
2424

2525
// For all other values, we want the values to be bitwise equal.
2626
return bits1.uintval() == bits2.uintval();

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,7 +3278,7 @@ bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
32783278
}
32793279

32803280
// If the index is still out of range then this isn't a pointer.
3281-
if (index > m_indexed_isa_cache.size())
3281+
if (index >= m_indexed_isa_cache.size())
32823282
return false;
32833283

32843284
LLDB_LOGF(log, "AOCRT::NPI Evaluate(ret_isa = 0x%" PRIx64 ")",

lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ GeneratePerfEventConfigValue(bool enable_tsc,
150150
if (enable_tsc) {
151151
if (Expected<uint32_t> offset = ReadIntelPTConfigFile(
152152
kTSCBitOffsetFile, IntelPTConfigFileType::BitOffset))
153-
config |= 1 << *offset;
153+
config |= 1ULL << *offset;
154154
else
155155
return offset.takeError();
156156
}

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ class RegionBuilderHelper {
523523
isInteger(arg0) && arg0.getType().getIntOrFloatBitWidth() == 1;
524524
bool tailFloatingPoint =
525525
isFloatingPoint(arg0) && isFloatingPoint(arg1) && isFloatingPoint(arg2);
526-
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg1);
526+
bool tailInteger = isInteger(arg0) && isInteger(arg1) && isInteger(arg2);
527527
OpBuilder::InsertionGuard g(builder);
528528
builder.setInsertionPointToEnd(&block);
529529
switch (ternaryFn) {

mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ScalableValueBoundsConstraintSet::computeScalableBound(
107107

108108
AffineMap bound = [&] {
109109
if (boundType == BoundType::EQ && !invalidBound(lowerBound) &&
110-
lowerBound[0] == lowerBound[0]) {
110+
lowerBound[0] == upperBound[0]) {
111111
return lowerBound[0];
112112
} else if (boundType == BoundType::LB && !invalidBound(lowerBound)) {
113113
return lowerBound[0];

polly/lib/External/isl/isl_local_space.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ isl_size isl_local_space_var_offset(__isl_keep isl_local_space *ls,
254254
isl_space *space;
255255

256256
space = isl_local_space_peek_space(ls);
257-
if (space < 0)
257+
if (space == NULL)
258258
return isl_size_error;
259259
switch (type) {
260260
case isl_dim_param:

0 commit comments

Comments
 (0)