1# Copyright (c) 2021-2022 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 InitobjCallsNotConstructor: 450 number: 47 451 args: name 452 message: Method '${name}' is not initializer or constructor. 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${std::hex << 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${std::hex << 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${std::hex << 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 JavaTypesMethodArgCannotBeConvertedToType: 521 number: 58 522 args: method_name 523 message: Internal error. Cannot convert argument of method '${method_name}' to type 524 525 JavaTypesArrayComponentTypeIsUndefined: 526 number: 59 527 message: Array component type is undefined 528 529 JavaTypesCannotConvertTypeIdToType: 530 number: 60 531 args: type_id 532 message: Cannot get type for TypeId 0x${std::hex << static_cast<size_t>(id)}. Unknown primitive type 533 534 ConflictingClassDefinitions: 535 number: 65 536 level: warning 537 args: klass, original_file, new_file 538 message: Class ${klass} is already defined ${original_file}, the new definition ${new_file} will be ignored. 539 540 AccumulatorPositionIsOutOfRange: 541 number: 66 542 level: error 543 message: Wrong call with accumulator instruction, the accumulator position is out of range 544 545 CflowInvalidJumpTarget: 546 number: 1000 547 args: method_name, jump_target_offset, jump_instruction_offset, details 548 message: > 549 Invalid jump target. 550 Method: '${method_name}'. 551 Jump target offset: ${jump_target_offset}. 552 Jump instruction offset: ${jump_instruction_offset}. 553 Details: '${msg}'. 554 555 CflowBodyFallIntoExcHandler: 556 number: 1001 557 args: method_name, instruction_offset 558 message: > 559 Invalid instruction in the method body, execution may go into exception handler. 560 Method: '${method_name}'. 561 Instruction offset: ${instruction_offset}. 562 563 CflowInvalidJumpIntoExcHandler: 564 number: 1002 565 args: method_name, handler_start_offset 566 message: > 567 Invalid jump into the exception handler. 568 Method: '${method_name}'. 569 Handler offset: ${handler_start_offset}. 570 571 CflowInternalError: 572 number: 1003 573 message: Internal error. Sorry. 574 575 CflowInvalidInstruction: 576 number: 1004 577 args: offset 578 message: > 579 Invalid instruction. 580 Instruction offset: ${offset}. 581 582 CflowInvalidJumpIntoMiddleOfInstruction: 583 number: 1005 584 args: jump_target_offset, jump_instruction_offset 585 message: > 586 Invalid jump. Jump into middle of instruction. 587 Jump instruction offset: ${jump_instruction_offset}. 588 Jump target offset: ${jump_target_offset}. 589 590 CflowInvalidJump: 591 number: 1006 592 args: jump_target_offset, jump_instruction_offset 593 message: > 594 Invalid jump. 595 Jump instruction offset: ${jump_instruction_offset}. 596 Jump target offset: ${jump_target_offset}. 597 598 CflowCannotFillInstructionsMap: 599 number: 1008 600 message: Cannot fill instructions map of the method. 601 602 CflowCannotFillJumpsMap: 603 number: 1009 604 message: Cannot fill jumps map of the method. 605 606 CflowExcHandlerInfo: 607 number: 1010 608 level: debug 609 args: address, try_block_scope, exception_class 610 message: > 611 Exception handler at address: ${address}. 612 Try block scope: ${try_block_scope}. 613 Exception class: '${exception_class}'. 614 615 CflowCannotCacheExcClass: 616 number: 1011 617 args: exc_class_name 618 message: Cannot cache exception class '${exc_class_name}'. 619 620 CflowCannotCheckExcHandlerDueToSize: 621 number: 1012 622 level: debug 623 message: Exception handler cannot be checked for cflow due to unknown size. 624 625 CflowCannotClearMarksOfExcHandlerBlock: 626 number: 1013 627 message: Cannot clear marks of exception handler code block. 628 629 CflowCannotFillJumpsOfExcHandlerBlock: 630 number: 1014 631 message: Cannot fill jumps map of the exception handler code block. 632 633 CflowCannotFillJumpsOfCodeBlock: 634 number: 1015 635 args: offset_start, offset_end 636 message: > 637 Cannot fill jumps map of the code block in the method body. 638 Code block: [ ${offset_start}, ${offset_end} ]. 639 640 DebugBreakpointSetInfo: 641 number: 2000 642 level: debug 643 args: method_name, id, offset 644 message: > 645 Breakpoint set for method name ${method_name}, id 0x${std::hex << id}, offset 0x${offset}. 646 647 DebugBreakpointWrongCfgLine: 648 number: 2001 649 args: line 650 message: > 651 Wrong breakpoint line: '${line}' 652 653 DebugBreakpointAddedInfo: 654 number: 2002 655 level: debug 656 args: method_name, offset 657 message: > 658 Added config for managed breakpoint for ${method_name}, offset 0x${std::hex << offset}. 659 660 DebugBreakpointWrongSection: 661 number: 2003 662 args: section_name 663 message: Wrong debug breakpoints section '${section_name}'. 664 665 DebugConfigWrongOptionsSection: 666 number: 2004 667 args: section_name, expected_sections 668 message: > 669 Wrong debug verifier options section '${section_name}', expected [${expected_sections}]. 670 671 DebugConfigWrongOptionsLine: 672 number: 2005 673 args: line 674 message: Wrong options line '${line}'. 675 676 DebugConfigWrongOptionForSection: 677 number: 2006 678 args: option, section_name, expected_options 679 message: > 680 Wrong option '${option}' for section '${section_name}', expected [${expected_options}]. 681 682 DebugConfigOptionIsActiveInfo: 683 number: 2007 684 level: debug 685 args: section, option 686 message: Option '${section}:${option}' is active. 687