We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee9add2 commit 1776194Copy full SHA for 1776194
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