We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06b037e commit 9046acbCopy full SHA for 9046acb
bolt/lib/Passes/PAuthGadgetScanner.cpp
@@ -544,8 +544,10 @@ class NoCFGPacRetAnalysis : public PacRetAnalysis {
544
MCInst &Inst = I.second;
545
546
// If there is a label before this instruction, it is possible that it
547
- // can be jumped-to, thus conservatively resetting S.
548
- if (BF.hasLabelAt(I.first))
+ // can be jumped-to, thus conservatively resetting S. As an exception,
+ // let's ignore any labels at the beginning of the function, as at least
549
+ // one label is expected there.
550
+ if (BF.hasLabelAt(I.first) && &Inst != &BF.instrs().begin()->second)
551
S = createUnsafeState();
552
553
// Check if we need to remove an old annotation (this is the case if
0 commit comments