michaeleischer / luajit Goto Github PK
View Code? Open in Web Editor NEWThis project forked from luajit/luajit
Mirror of the LuaJIT git repository
Home Page: http://luajit.org
License: Other
This project forked from luajit/luajit
Mirror of the LuaJIT git repository
Home Page: http://luajit.org
License: Other
Deterministic LuaJIT 2.0.4 -------------------------- This modification of LuaJIT aims to ensure deterministic execution of lua scripts. The motivation for a deterministic execution is that running a script multiple times with the same inputs always yields the same results. This can be used for fault- tolerance using state machine replication or, as intended here, to simplify debugging by looking at the problem over and over again. This requires recording and replaying all inputs that are observable by the program. These inputs comprise of every input directly passed to the program, everything read by the program, but also of indirect inputs like memory layout. Another way to avoid recording too much is to hide inputs by introducing certain conventions that replace an undefined behavior of an implementation by a deterministic one. In LUA memory addresses can't be observed directly (ignoring the FFI-library), however some information is leaked by tostring and pairs/next. The first returns a string containing the objects memory address, whereas the latter may produce a different ordering during iteration. This is caused by deriving the hash codes from the memory address. The problem is solved by ensuring that the iteration always proceeds in insertion order. LuaJIT modifications: Implemented: - pairs/next -> iteration in insertion order Todo: - Prevent Memory address leaks (tostring, lua_tostring) - "Deterministic" Garbage collection? (collectgarbage, lua_gc, weak tables) - Input recording (either input data or result of function call) -- luaL_loadfile -- file:*, io.* -- package.{loaders, loadlib, searchpath} -- os.* -- debug.debug Possibly problematic (must be reviewed): - Random numbers (ensure that math.randomseed input is recorded) - Garbage collection with __gc metafunction - Debugging hook (debug.sethook, lua_sethook, triggering is dependent on JIT activation) - Environment variables (LUA_CPATH, LUA_INIT, LUA_PATH) - ffi.* - jit.* - Own C functions (ensure determinism or remember results) - External modules LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. Project Homepage: http://luajit.org/ LuaJIT is Copyright (C) 2005-2016 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h. Documentation for LuaJIT is available in HTML format. Please point your favorite browser to: doc/luajit.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.