whatsapp / erlfuzz Goto Github PK
View Code? Open in Web Editor NEWerlfuzz is a fuzzer for the Erlang ecosystem
License: Apache License 2.0
erlfuzz is a fuzzer for the Erlang ecosystem
License: Apache License 2.0
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.)
As far as I can see, erlfuzz
never generates literal strings, such "abc"
.
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
)make_ref/0
, spawn_monitor/1
, monitor/2
. This blog post about receive optimizations gives some information about why that would be useful.setelement/3
(specially optimized by the compiler; see setelement/3 in the Efficiency Guide)setelement/3
optimization mentioned above).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.