File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void MarkRAStates::runOnFunction(BinaryFunction &BF) {
54
54
// authenticated, so functions always start with unsigned RAState when
55
55
// working with compiler-generated code)
56
56
BF.setIgnored ();
57
- BC.outs () << " BOLT-INFO: ignoring RAStates in function "
57
+ BC.outs () << " BOLT-INFO: inconsistent RAStates in function "
58
58
<< BF.getPrintName () << " \n " ;
59
59
return ;
60
60
}
@@ -72,10 +72,22 @@ void MarkRAStates::runOnFunction(BinaryFunction &BF) {
72
72
continue ;
73
73
74
74
if (BC.MIB ->isPSign (Inst)) {
75
- assert (!RAState && " Signed RA State before PSign" );
75
+ if (RAState) {
76
+ // RA signing instructions should only follow unsigned RA state.
77
+ BC.outs () << " BOLT-INFO: inconsistent RAStates in function "
78
+ << BF.getPrintName () << " \n " ;
79
+ BF.setIgnored ();
80
+ return ;
81
+ }
76
82
BC.MIB ->setRASigning (Inst);
77
83
} else if (BC.MIB ->isPAuth (Inst)) {
78
- assert (RAState && " Unsigned RA State before PAuth" );
84
+ if (!RAState) {
85
+ // RA authenticating instructions should only follow signed RA state.
86
+ BC.outs () << " BOLT-INFO: inconsistent RAStates in function "
87
+ << BF.getPrintName () << " \n " ;
88
+ BF.setIgnored ();
89
+ return ;
90
+ }
79
91
BC.MIB ->setAuthenticating (Inst);
80
92
} else if (RAState) {
81
93
BC.MIB ->setRASigned (Inst);
You can’t perform that action at this time.
0 commit comments