• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14namespace: panda::verifier
15component: verifier
16enum_name: VerifierMessage
17default_level: error
18messages:
19  DebugType:
20    number: 300
21    level: debug
22    args: type
23    message: ( type is '${type}' )
24
25  DebugConstructor:
26    number: 301
27    level: debug
28    args: constructor
29    message: ( constructor is '${constructor}' )
30
31  DebugArrayConstructor:
32    number: 302
33    level: debug
34    message: ( constructor is array constructor )
35
36  DebugField:
37    number: 303
38    level: debug
39    args: field
40    message: ( field is '${field}' )
41
42  DebugField2:
43    number: 304
44    level: debug
45    args: field
46    message: Field is '${field}'.
47
48  DebugMethod:
49    number: 305
50    level: debug
51    args: method
52    message: ( method is '${method}' )
53
54  DebugResult:
55    number: 307
56    level: debug
57    args: result
58    message: result = '${result}'
59
60  DebugRegisters:
61    number: 308
62    level: debug
63    args: prefix, registers
64    message: ${prefix} { ${registers} }
65
66  DebugStoreField:
67    number: 309
68    level: debug
69    args: field, field_type, acc_type, subtypes, field_subtypes
70    message: >
71      Field is '${field}'. Field type is '${field_type}'. Accumulator type is '${acc_type}'.
72      Compatible subtypes are: ${subtypes}. Types that can be stored without data loss are: ${field_subtypes}.
73
74  DebugMethodVerification:
75    number: 310
76    level: debug
77    args: method
78    message: Verification of method '${method}'.
79
80  DebugCodeBlockVerification:
81    number: 311
82    level: debug
83    args: address, entry_type
84    message: >
85      Verification of code block at address:
86      ${std::hex << std::setw(sizeof(uint32_t) * 2) << std::setfill('0') << address << std::dec << std::setw(0)}
87      (${entry_type}).
88
89  DebugExceptionHandlerCommonContextComputation:
90    number: 312
91    level: debug
92    args: address, maybe_exception, try_block_start, try_block_end
93    message: >
94      ${std::hex << std::setw(sizeof(uint32_t) * 2) << std::setfill('0')}
95      Computing common context for exception handler at address: ${address}${maybe_exception}
96      (try block scope is [${try_block_start}, ${try_block_end}]).${std::dec << std::setw(0)}
97
98  DebugFunctionReturnAndAccumulatorTypes:
99    number: 313
100    level: debug
101    args: return_type, acc_type
102    message: >
103      Function return type: '${return_type}'. Value type in accumulator: '${acc_type}'.
104
105  DebugFunctionReturnAndAccumulatorTypesWithCompatibleTypes:
106    number: 314
107    level: debug
108    args: return_type, acc_type, compatible_acc_types
109    message: >
110      Function return type: '${return_type}'. Value type in accumulator: '${acc_type}'.
111      Compatible accumulator types are: ${compatible_acc_types}.
112
113  DebugCallParameterTypes:
114    number: 315
115    level: debug
116    args: name, maybe_reg, actual_type, formal_type
117    message: >
118      In a call to '${name}'. ${maybe_reg}Actual type: '${actual_type}'. Formal type: '${formal_type}'.
119
120  DebugCallFromTo:
121    number: 316
122    level: debug
123    args: name_from, name_to
124    message: >
125      Call from '${name_from}' to '${name_to}'.
126
127  DebugRegisterChanged:
128    number: 317
129    level: debug
130    args: register, prev_atv_image, new_atv_image
131    message: " reg changed: ${register}    ${prev_atv_image} => ${new_atv_image}"
132
133  DebugAbsIntLogInstruction:
134    number: 318
135    level: debug
136    args: instruction
137    message: >
138      ABSINT: ${std::hex << std::setw(sizeof(uint32_t) * 2) << std::setfill('0') << instruction.GetOffset() << std::dec << ": " << instruction}
139
140  InvalidInstruction:
141    number: 64
142    level: error
143    message: >
144      Abstract interpretation stuck at invalid instruction.
145
146  BadId:
147    number: 1
148    args: kind, id
149    short_message: Bad ${#kind} id
150    message: Cannot resolve ${#kind} with id=${std::hex << id << std::dec}.
151
152  BadRegisterType:
153    number: 2
154    args: reg, reg_type, target_types, subtypes
155    message: >
156      ${reg} is of wrong type: '${reg_type}'. Expected a subtype of one from ${target_types}. Compatible subtypes are:
157      ${subtypes}.
158
159  LdaTypeBadLanguage:
160    number: 3
161    short_message: lda.type may be used only in Panda or Java methods
162
163  AlwaysNpe:
164    number: 4
165    level: warning
166    args: reg
167    short_message: always NPE in register
168    message: constant null in register v${reg}. NPE exception will always be thrown here. Accumulator type is not known.
169
170  AlwaysNpeAccumulator:
171    number: 5
172    level: warning
173    short_message: always NPE in accumulator
174    message: constant null in accumulator. NPE exception will always be thrown here.
175
176  BadArrayElementType:
177    number: 6
178    args: type, expected_type, subtypes
179    message: >
180      Wrong array element type '${type}'. Expected a subtype of '${expected_type}'. Compatible subtypes are: ${subtypes}.
181
182  BadArrayElementType2:
183    number: 7
184    args: type, expected_type
185    message: >
186      Wrong type of array elements '${type}'. Expected '${expected_type}'.
187
188  BadArrayElementType3:
189    number: 8
190    args: type, expected_types
191    message: >
192      Wrong type of array elements '${type}'. Expected one of ${expected_types}.
193
194  ArrayOfNonArrayType:
195    number: 9
196    args: type, array_types
197    message: >
198      Cannot create array of non-array type '${type}'. Possible types are ${array_types}.
199
200  ObjectOfNonObjectType:
201    number: 10
202    args: type, object_types
203    message: >
204      Cannot create object of non-object type '${type}'. Possible types are ${object_types}.
205
206  CannotResolveFieldType:
207    number: 11
208    args: field
209    message: >
210      Cannot resolve field type. Field is '%{field}'
211
212  ExpectedStaticOrInstanceField:
213    number: 12
214    args: is_static
215    short_message: >
216      Expected ${(is_static ? "static" : "instance")} field.
217
218  InconsistentRegisterAndFieldTypes:
219    number: 13
220    args: field, reg_idx, obj_type, field_obj_type, field_obj_subtypes
221    message: >
222      Inconsistency between type in register and field class type. Field is '${field}'.
223      Type in register v${reg_idx} is '${obj_type}'.
224      But expected type is '${field_obj_type}'.
225      Compatible subtypes are ${field_obj_subtypes}.
226
227  UnexpectedFieldType:
228    number: 14
229    args: field, field_type, field_obj_type, expected_subtypes
230    message: >
231      Field type is not expected one. Field is '${field}'.
232      Field type is '${field_type}'.
233      Expected a subtype of '${field_obj_type}'.
234      Compatible subtypes are ${expected_subtypes}.
235
236  BadAccumulatorReturnValueType:
237    number: 15
238    args: acc_type, expected_types
239    message: >
240      Wrong return value type (in accumulator): '${acc_type}'. Compatible types are: ${expected_types}.
241
242  BadAccumulatorReturnValueTypeWithSubtype:
243    number: 16
244    args: acc_type, expected_type, expected_types
245    message: >
246      Wrong return value type (in accumulator): '${acc_type}'. Expected a subtype of '${expected_type}'.
247      Compatible subtypes are: ${expected_types}.
248
249  BadReturnInstructionType:
250    number: 17
251    args: suffix, return_type, expected_type, subtypes
252    message: >
253      Incorrect 'return${suffix}' instruction. The type of method return value '${return_type}' is not a subtype of
254      '${expected_type}'. Compatible types are: ${subtypes}.
255
256  BadReturnVoidInstructionType:
257    number: 18
258    args: return_type
259    message: >
260      Incorrect 'return.void' instruction. The type of method return value '${return_type}' is not 'void'.
261
262  CheckCastToNonObjectType:
263    number: 19
264    args: type, possible_types
265    message: >
266      Wrong type for 'checkcast'. It is a non-object type '${type}'. Possible types are ${possible_types}.
267
268  NonObjectAccumulatorType:
269    number: 20
270    message: Accumulator is not a reference to an object.
271
272  AccumulatorAlwaysNull:
273    number: 21
274    level: warning
275    message: Accumulator constantly holds 'null' value. It may be a sign of possible error here.
276
277  RedundantCheckCast:
278    number: 22
279    level: warning
280    args: acc_type, type
281    message: >
282      Accumulator type '${acc_type}' is always a subtype of '${type}'. Checkcast is redundant here. It may be a sign of
283      possible error here.
284
285  ImpossibleCheckCast:
286    number: 23
287    level: warning
288    args: acc_type, possible_types
289    message: >
290      Accumulator is of incompatible type '${acc_type}'. Possible types are ${possible_types}.
291      Instruction 'checkcast' will always throw an exception here. It may be a sign of possible error here.
292
293  ImpossibleArrayCheckCast:
294    number: 24
295    level: warning
296    args: acc_elt_type, possible_types
297    message: >
298      Element type in array in accumulator is of incompatible type '${acc_elt_type}'. Possible types are
299      ${possible_types}. Instruction 'checkcast' will always throw an exception here. It may be a sign of
300      possible error here.
301
302  PossiblyIncompatibleAccumulatorType:
303    number: 25
304    level: warning
305    args: acc_type, possible_types
306    message: >
307      Accumulator seems to be of incompatible type '${acc_type}'. Possible types are ${possible_types}.
308      It may be a sign of possible error here.
309
310  BadIsInstanceInstruction:
311    number: 26
312    args: type, possible_types
313    message: >
314      Wrong type for 'isinstance'. It is a non-object/non-array type '${type}'. Possible types are ${possible_types}.
315
316  RedundantIsInstance:
317    number: 27
318    level: warning
319    args: acc_type, type
320    message: >
321      Accumulator type '${acc_type}' is always a subtype of '${type}'. Result of 'isinstance' is always one.
322      It may be a sign of possible error here.
323
324  ImpossibleIsInstance:
325    number: 28
326    level: warning
327    args: acc_type, possible_types
328    message: >
329      Accumulator is of incompatible type '${acc_type}'. Possible types are ${possible_types}.
330      Result of 'isinstance' is always zero. It may be a sign of possible error here.
331
332  ImpossibleArrayIsInstance:
333    number: 29
334    level: warning
335    args: acc_elt_type, possible_types
336    message: >
337      Element type in array in accumulator is of incompatible type '${acc_elt_type}'. Possible types are
338      ${possible_types}. It may be a sign of possible error here.
339
340  BadCallUndefinedRegister:
341    number: 30
342    args: name, reg_idx
343    message: >
344      Cannot make a call to '${name}' because of undefined register ${reg_idx}.
345
346  BadCallIncompatibleParameter:
347    number: 31
348    args: name, register, actual_type, expected_type
349    message: >
350      Cannot make a call to '${name}'. ${register} is physically incompatible with formal parameter.
351      ${register} physical type is '${actual_type}'. But the expected physical type is '${expected_type}'.
352
353  BadCallFormalIsBot:
354    number: 32
355    args: name, actual_type
356    message: >
357      Cannot make a call to '${name}'. Formal parameter is of type 'Bot', but actual parameter is of type ${actual_type}.
358
359  CallFormalActualBothBotOrTop:
360    number: 33
361    level: warning
362    args: type
363    message: >
364      Warning: formal and actual parameters are of type '${type}'.
365
366  CallFormalTop:
367    number: 34
368    level: warning
369    message: "Warning: formal parameter is of type 'Top'. Accepted any type of actual parameter."
370
371  CallFormalActualDifferent:
372    number: 35
373    level: warning
374    args: formal_type, actual_type, subtypes
375    message: >
376      Warning: formal type is '${formal_type}' but actual is '${actual_type}'. Actual type is inexact one, it may be one
377      of ${subtypes}. It may be so because of different paths through this code carrying different primitive type in
378      register, like in one path type is u16, in another - i32. It is not an error, but there may be potential problems
379      with rounding/precision/signedness/overflow etc.
380
381  BadCallIncompatibleLambdaType:
382    number: 36
383    args: name, reg, actual_type, physical_actual_type, formal_type, physical_formal_type
384    message: >
385      Cannot make a call to '${name}'. Actual lambda type ${reg}'${actual_type}' (physical type '${physical_actual_type}')
386      is not compatible with formal lambda type '${formal_type}' (physical type '${physical_formal_type}').
387
388  BadCallWrongRegister:
389    number: 37
390    args: name, reg_idx
391    message: >
392      Cannot make a call to '${name}' because of wrong type in register v${reg_idx}.
393
394  BadCallWrongParameter:
395    number: 38
396    args: name, actual_type, formal_type
397    message: >
398      Cannot make a call to '${name}' because of wrong type in actual parameter. Actual type: '${actual_type}'.
399      Formal type: '${formal_type}'.
400
401  BadCallTooFewParameters:
402    number: 39
403    args: name
404    message: >
405      Cannot make a call to '${name}' because of insufficient actual parameters.
406
407  BadCallStaticMethodAsVirtual:
408    number: 40
409    args: name
410    message: >
411      Attempt to call static method '${name}' as virtual.
412
413  BadAccumulatorType:
414    number: 41
415    args: acc_type, expected_type, subtypes
416    message: >
417      Wrong type of accumulator '${acc_type}'. Expected a subtype of '${expected_type}'. Compatible subtypes are ${subtypes}.
418
419  BadAccumulatorType2:
420    number: 42
421    args: acc_type, expected_types
422    message: >
423      Wrong type of accumulator '${acc_type}'. Expected one of ${expected_types}.
424
425  BadAccumulatorType3:
426    number: 43
427    level: warning
428    args: acc_type, expected_types
429    message: >
430      Accumulator type '${acc_type}' does not exactly match array element type. Expected one of ${expected_types}.
431
432  IncorrectJump:
433    number: 44
434    message: Incorrect jump. Should be ruled out on Cflow check, but was not. Internal error.
435
436  RegisterConflictHeader:
437    number: 45
438    level: warning
439    message: >
440      Warning: source and destination context are incompatible. Conflicting regs are:
441
442  RegisterConflict:
443    number: 46
444    level: debug
445    args: register, src_type, dst_type
446    message: >
447      ${register}: '${src_type}' (source) vs. '${dst_type}' (destination).
448
449  BadArrayConstructorName:
450    number: 47
451    args: name
452    message: Unexpected array ctor name '${name}', expected '<init>'.
453
454  TooFewArrayConstructorArgs:
455    number: 48
456    args: args_num
457    message: Insufficient arguments to array ctor. Expected ${args_num} more args.
458
459  UndefinedRegister:
460    number: 49
461    args: register
462    message: ${register} is undefined.
463
464  RegisterTypeConflict:
465    number: 50
466    args: register
467    message: There was a type conflict on ${register}. It cannot be used.
468
469  CommonContextInconsistentRegisterHeader:
470    number: 51
471    level: debug
472    message: >
473      Common context for try block scope has following inconsistent registers:
474
475  CannotFindClassDefinitionForMethodParameter:
476    number: 52
477    args: class_name, method_name, class_id
478    message: >
479      Cannot find class definition for method parameter. Method '${class_name}.${method_name}'.
480      Class id: ${std::hex << class_id << std::dec}.
481
482  CacheMissForClassAtOffset:
483    number: 53
484    args: offset
485    message: Class is not found in cache for offset 0x${std::hex << offset}
486
487  CannotResolveClassId:
488    number: 63
489    args: class_id
490    message: >
491      Cannot resolve class id 0x${class_id}
492
493  CacheMissForMethodAtOffset:
494    number: 54
495    args: offset
496    message: Method is not found in cache for offset 0x${std::hex << offset}
497
498  CannotResolveMethodId:
499    number: 62
500    args: method_id
501    message: >
502      Cannot resolve method id 0x${method_id}
503
504  CacheMissForFieldAtOffset:
505    number: 55
506    args: offset
507    message: Field is not found in cache for offset 0x${std::hex << offset}
508
509  CannotResolveFieldId:
510    number: 61
511    args: field_id
512    message: >
513      Cannot resolve field id 0x${field_id}
514
515  JavaTypesMethodArgWasNotResolved:
516    number: 56
517    args: method_name
518    message: Argument of method '${method_name}' was not resolved at caching stage (class was not found)
519
520  JavaTypesMethodArgCannotBeProcessed:
521    number: 57
522    args: method_name
523    message: Internal error. Cannot process argument of method '${method_name}'
524
525  JavaTypesMethodArgCannotBeConvertedToType:
526    number: 58
527    args: method_name
528    message: Internal error. Cannot convert argument of method '${method_name}' to type
529
530  JavaTypesArrayComponentTypeIsUndefined:
531    number: 59
532    message: Array component type is undefined
533
534  JavaTypesCannotConvertTypeIdToType:
535    number: 60
536    args: type_id
537    message: Cannot get type for TypeId 0x${std::hex << static_cast<size_t>(id)}. Unknown primitive type
538
539  CflowInvalidJumpTarget:
540    number: 1000
541    args: method_name, jump_target_offset, jump_instruction_offset, details
542    message: >
543      Invalid jump target.
544      Method: '${method_name}'.
545      Jump target offset: ${jump_target_offset}.
546      Jump instruction offset: ${jump_instruction_offset}.
547      Details: '${msg}'.
548
549  CflowBodyFallIntoExcHandler:
550    number: 1001
551    args: method_name, instruction_offset
552    message: >
553      Invalid instruction in the method body, execution may go into exception handler.
554      Method: '${method_name}'.
555      Instruction offset: ${instruction_offset}.
556
557  CflowInvalidLastInstOfExcHandlerFallIntoOtherExcHandler:
558    number: 1002
559    args: method_name, handler_start_offset, handler_end_offset
560    message: >
561      Invalid last instruction of exception handler.
562      Control flow may go into other exception handler.
563      Method: '${method_name}'.
564      Handler offsets: [ ${handler_start_offset}, ${handler_end_offset} ].
565
566  CflowInternalError:
567    number: 1003
568    message: Internal error. Sorry.
569
570  CflowInvalidInstruction:
571    number: 1004
572    args: offset
573    message: >
574      Invalid instruction.
575      Instruction offset: ${offset}.
576
577  CflowInvalidJumpIntoMiddleOfInstruction:
578    number: 1005
579    args: jump_target_offset, jump_instruction_offset
580    message: >
581      Invalid jump. Jump into middle of instruction.
582      Jump instruction offset: ${jump_instruction_offset}.
583      Jump target offset: ${jump_target_offset}.
584
585  CflowInvalidJump:
586    number: 1006
587    args: jump_target_offset, jump_instruction_offset
588    message: >
589      Invalid jump.
590      Jump instruction offset: ${jump_instruction_offset}.
591      Jump target offset: ${jump_target_offset}.
592
593  CflowCannotFillInstructionsMap:
594    number: 1008
595    message: Cannot fill instructions map of the method.
596
597  CflowCannotFillJumpsMap:
598    number: 1009
599    message: Cannot fill jumps map of the method.
600
601  CflowExcHandlerInfo:
602    number: 1010
603    level: debug
604    args: address, try_block_scope, exception_class
605    message: >
606      Exception handler at address: ${address}.
607      Try block scope: ${try_block_scope}.
608      Exception class: '${exception_class}'.
609
610  CflowCannotCacheExcClass:
611    number: 1011
612    args: exc_class_name
613    message: Cannot cache exception class '${exc_class_name}'.
614
615  CflowCannotCheckExcHandlerDueToSize:
616    number: 1012
617    level: debug
618    message: Exception handler cannot be checked for cflow due to unknown size.
619
620  CflowCannotClearMarksOfExcHandlerBlock:
621    number: 1013
622    message: Cannot clear marks of exception handler code block.
623
624  CflowCannotFillJumpsOfExcHandlerBlock:
625    number: 1014
626    message: Cannot fill jumps map of the exception handler code block.
627
628  CflowCannotFillJumpsOfCodeBlock:
629    number: 1015
630    args: offset_start, offset_end
631    message: >
632      Cannot fill jumps map of the code block in the method body.
633      Code block: [ ${offset_start}, ${offset_end} ].
634
635  DebugBreakpointSetInfo:
636    number: 2000
637    level: debug
638    args: hash, id, offset
639    message: >
640      Breakpoint set for method name hash 0x${std::hex << hash}, id 0x${id}, offset 0x${offset}.
641
642  DebugBreakpointWrongCfgLine:
643    number: 2001
644    args: line
645    message: >
646      Wrong breakpoint line: '${line}'
647
648  DebugBreakpointAddedInfo:
649    number: 2002
650    level: debug
651    args: method_name, hash, offset
652    message: >
653      Added config for managed breakpoint for '${method_name}' (hash 0x${std::hex << hash}), offset 0x${offset}.
654
655  DebugBreakpointWrongSection:
656    number: 2003
657    args: section_name
658    message: Wrong debug breakpoints section '${section_name}'.
659
660  DebugConfigWrongOptionsSection:
661    number: 2004
662    args: section_name, expected_sections
663    message: >
664      Wrong debug verifier options section '${section_name}', expected [${expected_sections}].
665
666  DebugConfigWrongOptionsLine:
667    number: 2005
668    args: line
669    message: Wrong options line '${line}'.
670
671  DebugConfigWrongOptionForSection:
672    number: 2006
673    args: option, section_name, expected_options
674    message: >
675      Wrong option '${option}' for section '${section_name}', expected [${expected_options}].
676
677  DebugConfigOptionIsActiveInfo:
678    number: 2007
679    level: debug
680    args: section, option
681    message: Option '${section}:${option}' is active.
682