Code Monkey home page Code Monkey logo

erlfuzz's People

Contributors

facebook-github-bot avatar robinmorisset avatar td5 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  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  avatar  avatar  avatar  avatar  avatar  avatar

erlfuzz's Issues

No deep terms are generated

From sys_core_alias.erl:

%% Builds the key used to check if a value can be
%% replaced by an alias. It considers literals,
%% aliases, variables, tuples and cons recursively.
%%
%% We bail out after an arbitrary amount of nodes
%% as very complex expressions may take forever to
%% process otherwise.
-define(DEPTH_LIMIT, 100).
nodes_to_key(Kind, Nodes) ->
    ntk_1(Nodes, [], Kind, ?DEPTH_LIMIT).

ntk_1(_, _Acc, _Kind, 0) ->
    error;

erlfuzz seems unable to generate code that causes the last line in the example (line 333) to be executed because it does not generate deep enough terms.

One way to cause the line to be executed is to compile the following function:

detect_charset({_,undefined} = State) ->
    {State, "Can't detect character encoding due to lack of indata"}.

(Each character in the string adds a depth of 2.)

Document what constructs are not generated

I think it can be useful to document what constructs erlfuzz never generates. (Alternatively, implement all missing constructs, but that might take a while. ๐Ÿ˜‰ ) Here is a list of things that I've found so far:

  • receive and ! (there have been many compiler bugs involving receive)
  • Calls to certain functions that returns references, such as make_ref/0, spawn_monitor/1, monitor/2. This blog post about receive optimizations gives some information about why that would be useful.
  • Calls to setelement/3 (specially optimized by the compiler; see setelement/3 in the Efficiency Guide)
  • Records (mostly useful for testing tools such as pretty-printers, but will also emit code that takes advantage of the setelement/3 optimization mentioned above).
  • The pre-processor. Difficult to implement and not useful for finding compiler bugs. Can be useful for testing tools such as language servers and pretty-printers. If it is ever implemented, I suggest it is turned off by default.

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.