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