Skip to main content
CISTI2022 - 17th Iberian Conference on Information Systems and Technologies

Full Program »

Aspect-Oriented Webassembly Transformation

There are scenarios where it can be useful or necessary to directly transform and instrument compiled code, rather than resorting to source code changes with subsequent compilation. These transformations can be motivated by several reasons, such as: immediate repair of problems encountered in production, neutralization of potentially malicious code, performance improvements, instrumentation for profiling and inspection purposes, fault injection, or unavailability of source code. While tools are available for conducting this kind of transformations for many different software ecosystems and languages, there is a limited set of options for doing so for WebAssembly applications. In this paper, we present a novel tool and language, the WasmManipulator/WmrLang, for manipulating WebAssembly code, which allows you to perform code transformations, using an aspect-oriented approach for specifying code locations, and code insertion, replacement, or deletion to be executed at those locations. In addition, because WebAssembly routines can be heavily interdependent on the JavaScript code that uses them, the tool has certain features that allow you to take advantage of and exploit this dependency. This includes defining additional types in WASM code, and interpreting/executing expressions at runtime.

João Rodrigues
Coimbra Polytechnic - ISEC
Portugal

Jorge Barreiros
Coimbra Polytechnic - ISEC
Portugal

 


Powered by OpenConf®
Copyright ©2002-2021 Zakon Group LLC