G06F9/44557

Modeling foreign functions using executable references

Techniques for representing a native function using an executable reference are disclosed. The system receives an instruction to create an executable reference for a native function, including a method type comprising a method signature corresponding to the executable reference, and a function description including (a) a memory layout corresponding to data returned by the function and (b) memory layouts corresponding to parameters required by the function. The system selects an application binary interface (ABI). The system generates code that, for each parameter, of the one or more parameters required by the function, converts the parameter from a value formatted for use by a Java Virtual machine to a value formatted for use in the native function, based on the selected ABI. Responsive to invocation of the executable reference, the generated code and the native function may be executed.

COMPRESSING FIRMWARE DATA

Methods, systems, and devices for compressing firmware data are described. A memory system may access firmware data associated with the memory system that includes bank data. The memory system may determine whether the bank data in the firmware data is compressed and, in cases that the bank data is compressed, the memory system may decompress the bank data prior to storing the bank data at a controller of the memory system. In some examples, a bank header in the firmware data may include information for the memory system to decompress the bank data. For example, the bank header may indicate the size of the compressed bank data associated with each bank. Additionally, the memory system may read the compressed bank data according to the indicated size and store the bank data at the controller or at a memory device of the memory system.

Generating and applying patches to computer program code concurrently with its execution

Techniques are disclosed for concurrently loading a plurality of new modules while code of a plurality of modules of an original computer program is loaded and executed on a computer system. An associated method may include allocating a module thread local storage (TLS) block for each thread within an initial computer program, wherein the allocated module TLS blocks are large enough to hold all module thread variables that are loaded or to be loaded. The method further may include reserving spare areas between the module TLS blocks for adding new module thread variables and arranging at an end of the module TLS blocks a thread data template section for resetting threads or creating new threads. The method may result in addition of modules to the original computer program and/or application of a concurrent patch through replacement of one or more of the plurality of original computer program modules.

Building memory layouts in software programs

The disclosed embodiments provide a system that facilitates the execution of a software program. During operation, the system obtains a set of artifacts associated with executing a software program. Next, the system uses the set of artifacts to determine an inheritance hierarchy associated with an artifact from the set of artifacts. The system then uses the inheritance hierarchy and the set of artifacts to generate a memory layout of an object instance represented by the artifact, wherein the memory layout includes a set of fields associated with a set of levels of the inheritance hierarchy.

Structural representation of generic type variable in a nominally typed virtual machine

Techniques herein process type variables to transform type parameters (TPs) of generic classes. In an embodiment, a computer stores a generic class attribute associated with a definition of a generic class. The generic class attribute includes a type variable declaration (TVD) for each TP. Each TVD is associated with usage entries (VUEs) within the definition. Each VUE indicates an actual type for use, within a portion of the definition, as the TP represented by the VUE. Based on how a particular portion of the definition uses a particular TP represented by a particular TVD of a particular VUE, the computer determines whether the particular VUE is to be assigned to a particular type or erased. In response to determining that the particular VUE is to be erased, the computer configures the particular VUE to indicate erasure. Otherwise, the computer assigns the particular type to the particular VUE.

System and method for transferring execution of a computer program

Disclosed are system and method for controlling execution of a computer program. An example method includes determining, by a processor, a memory sector for storing a portion of execution instructions of the computer program in virtual memory address space, determining, in the virtual memory address space, one or more pages that comprise code instructions and data associated with the memory sector, creating a duplicate of the virtual memory address space, tagging the memory sector and the one or more pages in both the virtual memory address space and the duplicate of the virtual memory address space, receiving a notification to transfer execution of the computer program between different memory sectors while executing instructions stored in either the virtual memory address space or the duplicate of the virtual memory address space and transferring execution of the computer program to a memory location other than the one in which the notification was received.

AUTOMATIC SYNOPSIS GENERATION FOR COMMAND-LINE INTERFACES

Aspects of the disclosure provide for mechanisms for automatic generating synopsis data of command-line commands. A method of the disclosure includes processing source code implementing a command; identifying, in view of the processing, a plurality of command options related to the command; generating, by a processing device, relationship data representing dependencies of the command options; and generating, by the processing device, synopsis data for the command in view of the relationship data. In some embodiments, the relationship data may include a graph, wherein the graph including an arc that associates a first node of the graph with a second node of the graph. The first node may correspond to the first command option. The second node may correspond to the second command option.

METHOD AND APPARATUS FOR LOADING ELF FILE OF LINUX SYSTEM IN WINDOWS SYSTEM
20190087208 · 2019-03-21 ·

The present invention discloses a method and apparatus for loading an ELF file of a Linux system into a Windows system. The method comprises: resolving the ELF file in accordance with a format of the ELF file; loading the whole ELF file into a Windows system memory according to a Windows system memory storage rule; acquiring a memory address, of a file content corresponding to a symbol recorded in a symbol table of the ELF file, in the Windows system in accordance with a resolution result of the ELF file; and linking the symbol with the memory address, of the file content corresponding to the symbol, in the Windows system.

SYSTEM AND METHOD FOR TRANSFERRING CONTROL OF INSTRUCTION EXECUTION BETWEEN ADDRESS SPACES

Disclosed are system and method for controlling execution of a computer program. An example method includes determining whether code instructions or data of interest are found in a portion of a page in an original virtual address space, when the code instructions or data are found in the portion of the page of a first type, tagging it as non-executable and tagging the portion of no interest as executable, when the code instructions or data are found in the portion of the second type, tagging it using an opcode and tagging the portion of no interest as executable, when the code instructions or data are found in the portion of the first type, duplicating the original virtual address space and tagging the portion of interest as executable and tagging the portion of no interest as non-executable and transferring execution of the computer program to a memory location other than the one in which a notification was received.

SYSTEM AND METHOD FOR TRANSFERRING EXECUTION OF A COMPUTER PROGRAM

Disclosed are system and method for controlling execution of a computer program. An example method includes determining, by a processor, a memory sector for storing a portion of execution instructions of the computer program in virtual memory address space, determining, in the virtual memory address space, one or more pages that comprise code instructions and data associated with the memory sector, creating a duplicate of the virtual memory address space, tagging the memory sector and the one or more pages in both the virtual memory address space and the duplicate of the virtual memory address space, receiving a notification to transfer execution of the computer program between different memory sectors while executing instructions stored in either the virtual memory address space or the duplicate of the virtual memory address space and transferring execution of the computer program to a memory location other than the one in which the notification was received.