Giter Club home page Giter Club logo

tla-fuzzer's Introduction

Top-level await correctness fuzzer

This is a fuzzer to test the correctness of various top-level await JavaScript bundling strategies. Fuzzing is done by randomly generating module graphs and comparing the evaluation order of the bundled code with V8's native module evaluation order.

How to run

  1. Install dependencies with npm ci
  2. Run the fuzzer with node ./fuzzer.js

Current results

"Same" here means that the bundled code behaves exactly the same as the unbundled code. "Different" here means that the bundled code behaves differently (i.e. is evaluated in a different order) than unbundled code. The same percentage means how many runs were same out of 300 total runs.

Note: Both the specification and V8/node currently have subtle bugs that cause undesirable behavior. So it's not really the case that matching V8/node 100% exactly is desirable. But it is desirable to match V8/node at least almost exactly (~99%) as the bugs are very subtle and only affect a few edge cases. Hopefully the various implementations of top-level await will converge on the same behavior in the future.

Variant: simple

  • Custom module registry algorithm: โœ… Same (100% same)
  • Webpack 5.75.0: โœ… Same (100% same)
  • Import becomes inline await: ๐Ÿšซ Different (80% same)
  • Rollup 3.7.4: ๐Ÿšซ Different (80% same)
  • SystemJS 6.13.0: ๐Ÿšซ Different (67% same)

Variant: trailing promise

  • Webpack 5.75.0: โœ… Same (100% same)
  • Custom module registry algorithm: ๐Ÿšซ Different (100% same)
  • SystemJS 6.13.0: ๐Ÿšซ Different (40% same)
  • Rollup 3.7.4: ๐Ÿšซ Different (14% same)
  • Import becomes inline await: ๐Ÿšซ Different (11% same)

Variant: cyclic

  • Custom module registry algorithm: ๐Ÿšซ Different (99% same)
  • Webpack 5.75.0: ๐Ÿšซ Different (99% same)
  • SystemJS 6.13.0: ๐Ÿšซ Different (85% same)
  • Import becomes inline await: ๐Ÿšซ Different (67% same)
  • Rollup 3.7.4: ๐Ÿšซ Different (67% same)

Variant: cyclic, trailing promise

  • Custom module registry algorithm: ๐Ÿšซ Different (99% same)
  • Webpack 5.75.0: ๐Ÿšซ Different (99% same)
  • SystemJS 6.13.0: ๐Ÿšซ Different (46% same)
  • Rollup 3.7.4: ๐Ÿšซ Different (22% same)
  • Import becomes inline await: ๐Ÿšซ Different (20% same)

tla-fuzzer's People

Contributors

evanw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zeta1999 ulivz lihqi

tla-fuzzer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.