Docs
TSA Execution Exits Overview

TSA Execution Exits Overview

Learn what TSA execution exits are and how they appear in analysis results.

Execution exits are the specific findings or results generated by TSA. You can find them in SARIF reports.

Most typical use cases do not require you to handle SARIF reports directly. If you are following a basic tutorial or workflow, you can safely skip this section.

TSA closely emulates the TON virtual machine, and for this reason, most of the TSA execution exits correspond to TVM runtime errors.

Besides that, TSA performs some additional checks, that do not correspond to the built-in TVM runtime errors. For example, TSA can check the correctness of parsing slices with specified TL-B scheme. For more detail, refer to the section about additional checks.

Additional checks

TL-B parsing errors

TSA might report the following errors about TL-B parsing:

  • unexpected-data-reading: reading bits from slice when TL-B scheme suggests that it should have no bits left.
  • unexpected-ref-reading: reading references from slice when TL-B scheme suggests that it should have no references left.
  • unexpected-end-of-cell: calling end_parse when TL-B scheme suggests that the slice is not empty yet.
  • unexpected-cell-type: reading unexpected data from slice. For example, calling load_coins on a slice when TL-B scheme suggests that it contains an address.
  • out-of-switch-bounds. This error occurs when TL-B scheme suggests that the slice has a tag of the length x, but reading of a length greater than x is performed.
  • unexpected-type-for-switch. This error occurs when TL-B scheme suggests that the reading of a tag is expected, but reading of unexpected type (for example, coins or address) is performed.

These checks can be turned off with the option --no-tlb-checks.

Address parsing errors

These errors are about addr_var and anycast addresses, that were forbidden in TVM 10.

Since behavior for such addresses depends on the TVM version, these errors are reported separately from standard cell underflow errors. These include:

  • anycast-address-usage: reading of an anycast address.
  • var-address-usage: reading of addr_var.

Dict operation errors

These errors occur when dictionary operations are performed on ordinary data cells and vice versa.

Errors:

  • dict-operation-on-data-cell
  • data-cell-operation-on-dict

Send modes errors

Bad combinations of message send modes.

Errors:

  • double-send-remaining-value: SendRemainingValue mode is used twice in one transaction.
  • constructed-message-cell-overflow: the first rewrite of the message during was not enough to fix cell overflow that occurred after replacing the src_address from 00 to an actual address of a sender.
  • bad-destination-address: the message's destination address was malformed (specifically, is a none address)