# US 10,481,964 B2 · Monitoring activity of software development kits using stack trace analysis

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,481,964 B2
- Document ID: US10481964B2
- Status: Granted
- Kind: B2
- Application number: 16/012,875
- Filed: 2018-06-20
- Published: 2018-10-18
- Granted: 2019-11-19
- Earliest claimed: 2016-12-22
- Assignees: Safedk Mobile Ltd
- Applicants: SafeDK Mobile Ltd.
- Inventors: Ariel Cattan; Idan Mandil; Eldad Moneta
- Web page: https://patentgrep.com/patent/US10481964B2

## CPC

- G06F 11/0742: {in a data processing system embedded in a mobile device, e.g. mobile phones, handheld devices}
- G06F 11/0778: {Dumping, i.e. gathering error/state information after a fault for later diagnosis}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3065: {Monitoring arrangements determined by the means or processing involved in reporting the monitored data (error or fault reporting or logging G06F11/0766)}
- G06F 11/3471: {Address tracing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Method, product and system for analyzing an execution of a program which uses Software Development Kits (SDKs), wherein the program is configured to invoke execution units, wherein a portion of the execution units are SDK execution units that are comprised by the SDKs. The method comprises: obtaining a stack trace of the execution of the program, wherein the stack trace comprises addresses of execution units; iterating over the stack trace to identify an address of an SDK execution unit, wherein said iterating comprises: comparing an address from the stack trace to a set of addresses associated with SDK execution units; and in response to determining the address is comprised by the set of address, identifying the address as an address of the SDK execution unit; and sending a report to a server, wherein the report identifies an SDK comprising the SDK execution unit.

## Claims

### Claim 1

A computer program product for analyzing an execution of a program, wherein the program is configured to use one or more Software Development Kits (SDKs),
wherein the program is configured to invoke execution units, wherein a portion of the execution units are SDK execution units that are comprised by the one or more SDKs,
wherein the computer program product comprising a non-transitory computer readable storage medium retaining program instructions, which program instructions when read by a processor, cause the processor to perform a method comprising:
obtaining a stack trace of the execution of the program, wherein the stack trace comprises addresses, each address is an address of an execution unit by the program having the address;
iterating over the stack trace to identify an address of an SDK execution unit, wherein said iterating comprises:
comparing an address from the stack trace to a predetermined set of addresses associated with SDK execution units,
wherein the predetermined set of addresses is complied prior to said comparing, wherein each address in the predetermined set of addresses is identified as associated to a particular SDK execution unit;
in response to determining the address is comprised by the predetermined set of address, identifying the address as an address of the SDK execution unit; and
sending a report to a server, wherein the report identifies an SDK comprising the SDK execution unit, wherein the report is accessible to a developer of the program.

### Claim 2 (depends on 1)

The computer program product of claim 1,
wherein the stack trace is a stack trace depicting a state of the execution that lead to the program crashing;
wherein the report comprises a crash report, whereby the server gathering from a plurality of instances of the program, crash reports accessible to the developer, whereby SDK-caused crashes are identifiable to the developer.

### Claim 3 (depends on 1)

The computer program product of claim 1,
wherein the stack trace is a stack trace depicting a state of the execution prior to accessing a resource of a computation platform executing the program;
wherein the report comprises information regarding resource consumption by the SDK, whereby SDK resource consumption is monitored, whereby the server maintaining an aggregated SDK resource consumption report that is accessible to the developer.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the predetermined set of addresses associated with SDK execution units are determined at build-time of the program, wherein at build-time, a symbol table and an executable file of the program are analyzed to identify the execution units, wherein each execution unit is analyzed, based on a corresponding symbol of the execution unit, to determine to which SDK the execution unit is associated, if any, wherein the predetermined set of addresses comprises addresses of execution units identified as SDK execution units during build-time.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein said iterating comprises: before performing said comparing, querying a hash table to determine if the address is in the hash table, wherein in response to a determination that the address is in the hash table, obtaining from the hash table, an identification of the SDK, whereby the address is identified as an address of the SDK execution unit without comparing the address with the predetermined set of addresses, whereby reducing overhead of said iterating.

### Claim 6 (depends on 1)

The computer program product of claim 1, wherein in response to said determining the address is comprised by the predetermined set of addresses, adding the address to a hash table together with an identification of the SDK.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein two SDK execution units of two different SDKs can potentially have a same name, whereby a name of an SDK execution unit is insufficient to uniquely identify an SDK comprising the execution unit.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein said iterating is performed in a Last-In First-Out (LIFO) order, wherein said iterating comprises: skipping an address of a system call in the stack trace.

### Claim 9 (depends on 1)

An apparatus comprising a processor and memory, wherein said memory retaining the computer program product of claim 1.

### Claim 10

An apparatus for preparing a program for analysis, wherein the program is configured to use one or more Software Development Kits (SDKs), wherein the program is configured to invoke execution units, wherein a portion of the execution units are SDK execution units that are comprised by the one or more SDKs, wherein said apparatus comprising a processor and a memory, wherein said processor is configured to perform the steps of:
obtaining symbols of execution units that are potentially invoked by the program during execution;
querying, using the symbols, an SDK database to identify the SDKs used by the program; and
compiling a set of addresses within the executable that are attributable to the one or more SDKs, wherein each address is identified as associated to a particular SDK;
whereby during execution of the program, a stack trace of the execution can be analyzed and addresses obtained therefrom compared to the set of addresses in order to identify an SDK execution unit and its corresponding SDK.
