<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Herbert Rocha</title>
    <description>My Personal Web Site</description>
    <link>https://hbgit.github.io/</link>
    <atom:link href="https://hbgit.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 15 Sep 2022 00:45:42 +0000</pubDate>
    <lastBuildDate>Thu, 15 Sep 2022 00:45:42 +0000</lastBuildDate>
    <generator>Jekyll v3.9.2</generator>
    
      <item>
        <title>Install Crucible</title>
        <description>&lt;h1 id=&quot;install-crucible-for-c-programs&quot;&gt;Install Crucible for C Programs&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;This post is based on text from &lt;a href=&quot;https://github.com/GaloisInc/crucible&quot;&gt;Crucible repository&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Crucible is a language-agnostic library for performing forward symbolic execution of imperative programs.  It provides a collection of data-structures and APIs for expressing programs as control-flow graphs. Programs expressed as CFGs in this way can be automatically explored by the symbolic execution engine. In addition, new data types and operations can be added to the symbolic simulator by implementing fresh primitives directly in Haskell. Check out the GitHub at https://github.com/GaloisInc/crucible&lt;/p&gt;

&lt;p&gt;For the next steps, we adopted a Linux docker container, aiming to keep a pattern for our commands.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Install docker, checking out this &lt;a href=&quot;[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04]&quot;&gt;LINK&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create our container:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker run &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; crucible ubuntu:18.04 /bin/bash
&lt;span class=&quot;go&quot;&gt;Unable to find image &quot;ubuntu:18.04&quot; locally
18.04: Pulling from library/ubuntu
423ae2b273f4: Pull complete 
de83a2304fa1: Pull complete 
f9a83bce3af0: Pull complete 
b6b53be908de: Pull complete 
&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Install Crucible and fetching the dependencies. In this step, we’ll install tools, such as ghc (Haskell compiler) v8.6.5, Boost library (libboost-all-dev), Number Theory Library (libntl-dev) development files, and GNU Linear Programming Kit. Let’s go to the commands:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;software-properties-common &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;add-apt-repository ppa:hvr/ghc &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;ghc-8.6.5 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /opt/ghc/bin/ghc-8.6.5 /usr/bin/ghc
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;cabal-install-3.0 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /opt/cabal/bin/cabal-3.0 /bin/cabal
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;git &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libboost-all-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libntl-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libglpk-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libncurses5-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;home
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;git clone https://github.com/GaloisInc/crucible.git
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;crucible
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;From the Crucible repository, we’ll get the following Haskell packages: crucible, crucible-llvm, crucible-saw, crucible-syntax, and crux. Additionally, the crux-llvm library/executable package that is a standalone frontend for executing C and C++ programs in the crucible symbolic simulator. The front-end invokes clang to produce LLVM bitcode and runs the resulting programs using the crucible-llvm language frontend.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s build the Crucible packages, starting to fetch all the latest git versions of immediate dependencies of libraries in this repository:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./scripts/build-sandbox.sh
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;Submodule 'abc-build' (https://github.com/GaloisInc/abc.git) registered for path 'dependencies/what4/dependencies/abcBridge/abc-build'
Cloning into '/home/crucible/dependencies/what4/dependencies/abcBridge/abc-build'...
Submodule path 'dependencies/what4/dependencies/abcBridge/abc-build': checked out 'c78ee31186ab4da49f348f1262c27c0a048bba82'
Submodule path 'dependencies/what4/dependencies/aig': checked out 'b59077c065b659e985ee25966809dd448a0d595a'
Submodule path 'dependencies/what4/dependencies/blt': checked out 'd0c8d9d14fe1bb43045ca04d6961a6290af637b7'
Submodule path 'dependencies/cryptol-verifier': checked out 'f33f4f234da9f48664f61bd9492b09259c78b60f'
Submodule path 'dependencies/jvm-parser': checked out '5368a84117dc28e0002003e8d8a491dd8756b421'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Update the Haskell packages and build the Crucible packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-configure
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;crux-llvm-0.3.2 (test:crux-llvm-test) (first run)
crux-llvm-0.3.2 (exe:crux-llvm-svcomp) (first run)
crux-llvm-0.3.2 (exe:crux-llvm) (first run)
crucible-mc-0.1.0.0 (exe:crucible-mc) (first run)
cryptol-verifier-0.1 (exe:css) (first run)
cryptol-verifier-0.1 (test:cryptol-verifier-tc-test) (first run)
crucible-server-0.1 (first run)

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crucible
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[50 of 50] Compiling Lang.Crucible.Vector ( src/Lang/Crucible/Vector.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crucible-0.5/build/Lang/Crucible/Vector.o )

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crucible-llvm
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[44 of 44] Compiling Lang.Crucible.LLVM.Ctors ( src/Lang/Crucible/LLVM/Ctors.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crucible-llvm-0.3/build/Lang/Crucible/LLVM/Ctors.o )

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crucible-saw
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[1 of 1] Compiling Lang.Crucible.Backend.SAWCore ( src/Lang/Crucible/Backend/SAWCore.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crucible-saw-0.1/build/Lang/Crucible/Backend/SAWCore.o )

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crucible-syntax
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[1 of 1] Compiling Main             ( crucible-syntax/Main.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crucible-syntax-0.1/x/crucibler/build/crucibler/crucibler-tmp/Main.o )
Linking /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crucible-syntax-0.1/x/crucibler/build/crucibler/crucibler ...

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crux
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[18 of 18] Compiling Crux             ( src/Crux.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-0.1/build/Crux.o )

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cabal new-build crux-llvm
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[1 of 1] Compiling Main             ( svcomp/Main.hs, /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm-svcomp/build/crux-llvm-svcomp/crux-llvm-svcomp-tmp/Main.o )
Linking /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/crux-llvm ...
Linking /home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm-svcomp/build/crux-llvm-svcomp/crux-llvm-svcomp ...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s done.&lt;/p&gt;

&lt;h2 id=&quot;install-llvm-v8&quot;&gt;Install LLVM v8&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The LLVM tool, e.g., Clang-8 allows the Crucible to execute the C code verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; build-essential subversion cmake ninja-build python-minimal wget
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/apt/sources.list
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/apt/sources.list
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wget &lt;span class=&quot;nt&quot;&gt;-O&lt;/span&gt; - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;aptitude &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;aptitude &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libllvm-8-ocaml-dev libllvm8 llvm-8 llvm-8-dev llvm-8-doc llvm-8-examples llvm-8-runtime &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;aptitude &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;clang-8 clang-tools-8 clang-8-doc libclang-common-8-dev libclang-8-dev libclang1-8 clang-format-8 python-clang-8 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /usr/bin/clang-8 /usr/bin/clang
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /usr/bin/opt-8 /usr/bin/opt
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /usr/bin/llvm-link-8 /usr/bin/llvm-link
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;install-a-solver&quot;&gt;Install a Solver&lt;/h2&gt;

&lt;p&gt;In this case, we’ll install Yices as an SMT solver. Further details at https://yices.csl.sri.com/&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;add-apt-repository ppa:sri-csl/formal-methods &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;yices2 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;testing-crucible-llvm&quot;&gt;Testing Crucible LLVM&lt;/h2&gt;

&lt;p&gt;In this step we’ll adopt the following code using SV-COMP rules to check a given code:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Setting up:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; /home/crucible/crux-llvm/c-src &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class=&quot;language-C&quot;&gt;// test.c code
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;crucible.h&amp;gt;

int8_t f(int8_t x) {
  return x + 1;
}

int main() {
  int8_t x = crucible_int8_t(&quot;x&quot;);

  assuming(x &amp;lt; 100);
  check(f(x) &amp;lt; 100);
  return 0;
}

&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
  &lt;li&gt;Running:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./crux-llvm test.c &lt;span class=&quot;nt&quot;&gt;-x&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[CLANG] clang &quot;-c&quot; &quot;-g&quot; &quot;-emit-llvm&quot; &quot;-O1&quot; &quot;-I&quot; &quot;.&quot; &quot;-I&quot; &quot;c-src/includes&quot; &quot;-o&quot; &quot;test.bc&quot; &quot;test.c&quot;
[Crux] Simulating function &quot;main&quot;
[Crux] Attempting to prove verification conditions.
[Crux] Goal status:
[Crux]   Total: 1
[Crux]   Proved: 0
[Crux]   Disproved: 1
[Crux]   Incomplete: 0
[Crux]   Unknown: 0
[Crux] Overall status: Invalid.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: The crucible.h API allows for better explanations by a) allowing user-specified names for non-deterministic variables, and b) ensuring that the conditions used in assertions are directly available and not obscured by a conditional wrapper around an error function. It’s possible you need to fix the header path, e.g., replace &lt;crucible.h&gt; by &quot;crucible.h&quot;.&lt;/crucible.h&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;testing-crucible-llvm-using-sv-comp-definitions&quot;&gt;Testing Crucible LLVM using SV-COMP definitions&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The following example.c code has the __VERIFIER_ERROR() function the points an error location in the code. This way, the goal of the code verification is found values to reach code location.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class=&quot;language-C&quot;&gt;extern void __VERIFIER_error() __attribute__((__noreturn__));
extern int __VERIFIER_nondet_int(void);

int main(){
    
  int a = __VERIFIER_nondet_int();
  int b = __VERIFIER_nondet_int();

  if( (a+b) &amp;gt; 42 ){
      __VERIFIER_error();
  }
  
  return 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
  &lt;li&gt;Running:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./crux-llvm example.c &lt;span class=&quot;nt&quot;&gt;-x&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[CLANG] clang &quot;-c&quot; &quot;-g&quot; &quot;-emit-llvm&quot; &quot;-O1&quot; &quot;-I&quot; &quot;.&quot; &quot;-I&quot; &quot;c-src/includes&quot; &quot;-o&quot; &quot;example.bc&quot; &quot;example.c&quot;
[Crux] Simulating function &quot;main&quot;
[Crux] Attempting to prove verification conditions.
[Crux] Goal status:
[Crux]   Total: 2
[Crux]   Proved: 0
[Crux]   Disproved: 2
[Crux]   Incomplete: 0
[Crux]   Unknown: 0
[Crux] Overall status: Invalid.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; In this code verification Crucible set to verification condition: overflow, and reach check. Now let’s check the report:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/crucible#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;results/example/report.js
&lt;span class=&quot;go&quot;&gt;var goals = [{&quot;status&quot;: &quot;fail&quot;,&quot;counter-example&quot;: [ {&quot;name&quot;: &quot;X&quot;,&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;6&quot;,&quot;col&quot;: &quot;13&quot;},&quot;val&quot;: &quot;BV 2147483648&quot;,&quot;bits&quot;: &quot;32&quot;}
, {&quot;name&quot;: &quot;X&quot;,&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;7&quot;,&quot;col&quot;: &quot;13&quot;},&quot;val&quot;: &quot;BV 2147483648&quot;,&quot;bits&quot;: &quot;32&quot;}
]
,&quot;goal&quot;: &quot;LLVM Poison value created\nSigned addition caused wrapping even though the `nsw` flag was set&quot;,&quot;location&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;9&quot;,&quot;col&quot;: &quot;11&quot;},&quot;assumptions&quot;: [],&quot;trivial&quot;: false,&quot;path&quot;: []},{&quot;status&quot;: &quot;fail&quot;,&quot;counter-example&quot;: [ {&quot;name&quot;: &quot;X&quot;,&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;6&quot;,&quot;col&quot;: &quot;13&quot;},&quot;val&quot;: &quot;BV 0&quot;,&quot;bits&quot;: &quot;32&quot;}
, {&quot;name&quot;: &quot;X&quot;,&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;7&quot;,&quot;col&quot;: &quot;13&quot;},&quot;val&quot;: &quot;BV 1073741824&quot;,&quot;bits&quot;: &quot;32&quot;}
]
,&quot;goal&quot;: &quot;__VERIFIER_error&quot;,&quot;location&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;10&quot;,&quot;col&quot;: &quot;9&quot;},&quot;assumptions&quot;: [{&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;9&quot;,&quot;col&quot;: &quot;9&quot;}}],&quot;trivial&quot;: false,&quot;path&quot;: [{&quot;loop&quot;: [1],&quot;loc&quot;: {&quot;file&quot;: &quot;/home/crucible/dist-newstyle/build/x86_64-linux/ghc-8.6.5/crux-llvm-0.3.2/x/crux-llvm/build/crux-llvm/example.c&quot;,&quot;line&quot;: &quot;9&quot;,&quot;col&quot;: &quot;9&quot;}}]}]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Let’s focus on the values generated to reach the line:
    &lt;ul&gt;
      &lt;li&gt;“line”: “6”,”col”: “13”},”val”: “BV 0”&lt;/li&gt;
      &lt;li&gt;“line”: “7”,”col”: “13”},”val”: “BV 1073741824”&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Aiming to get a better way to visualize you should see the files at path results/example/&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Goal 1 to check, possible overflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/crucible_1_result.png&quot; alt=&quot;Result goal 1&quot; title=&quot;Result goal 1&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Goal 2 to check, reach check&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/crucible_2_result.png&quot; alt=&quot;Result goal 2&quot; title=&quot;Result goal 2&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Wed, 08 Jul 2020 11:48:00 +0000</pubDate>
        <link>https://hbgit.github.io/vvt/2020/07/08/crucible-install.html</link>
        <guid isPermaLink="true">https://hbgit.github.io/vvt/2020/07/08/crucible-install.html</guid>
        
        
        <category>VVT</category>
        
      </item>
    
      <item>
        <title>Project Flutter A to Z</title>
        <description>&lt;h1 id=&quot;project-flutter-a-to-z&quot;&gt;Project Flutter A to Z&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/assets/flutter_logo.png&quot; alt=&quot;Flutter logo&quot; title=&quot;Flutter logo&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;keep-watching&quot;&gt;Keep Watching&lt;/h2&gt;

&lt;p&gt;I’ve been writing some APPs examples using &lt;strong&gt;Flutter CI/CD&lt;/strong&gt; adopting GitHub actions. The steps of the main flow of the project are:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Adopting GitHub as version control from the source code project, thus each commit on branch master is analyzed using flutter analyze&lt;/li&gt;
  &lt;li&gt;Running the tests, including widget tests and unit testing&lt;/li&gt;
  &lt;li&gt;The results of the tests are then sent to CodeCov (https://codecov.io/) service to analyze the code coverage&lt;/li&gt;
  &lt;li&gt;All previously items are done, then the App APK is built in the GitHub repository generating the draft release&lt;/li&gt;
  &lt;li&gt;Finally, adopting the GitHub actions, the App is deployed in the GitHub pages using Flutter Web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Checking out the project&lt;/strong&gt;: https://github.com/hbgit/flutter_a_z&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/flutter_pub.png&quot; alt=&quot;Flutter Project&quot; title=&quot;Flutter Project&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 27 Apr 2020 18:00:00 +0000</pubDate>
        <link>https://hbgit.github.io/flutter/2020/04/27/flutter-a-z.html</link>
        <guid isPermaLink="true">https://hbgit.github.io/flutter/2020/04/27/flutter-a-z.html</guid>
        
        
        <category>Flutter</category>
        
      </item>
    
      <item>
        <title>Install and Setting up Flutter Devel</title>
        <description>&lt;h1 id=&quot;installing-flutter-to-write-apps-on-linux&quot;&gt;Installing Flutter to write APPs on Linux&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/assets/flutter_logo.png&quot; alt=&quot;Flutter logo&quot; title=&quot;Flutter logo&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;do-you-know-how-to-use-flutter-on-linux&quot;&gt;Do you know how to use flutter on Linux?&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;If your answer is I don’t, no problem. More details about Flutter at https://flutter.dev&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In the future, I’ll present some examples, but for now, let’s set up our devel environment on Linux&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In this post we’ll learn how to install all basic requirements to write your APPs using Flutter on Linux, this include:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;Install Flutter SDK&lt;/li&gt;
      &lt;li&gt;Install Android SDK&lt;/li&gt;
      &lt;li&gt;How to use sdkmanager tool to install Android platforms-tools&lt;/li&gt;
      &lt;li&gt;Setting up Visual Code to Flutter and Dart that is the programming language&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-0-install-flutter&quot;&gt;STEP 0: Install Flutter&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Install flutter from the website, in this case, go to https://flutter.dev/docs/get-started/install/linux , there you find all system requirements, e.g., disk space 600 MB, but personally I rather 2 GB, this because of the additional libraries and IDE. Thus, let’s start.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create a directory to save the files to install Flutter:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; ~/development
&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wget https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.7-stable.tar.xz 
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;tar &lt;/span&gt;xf flutter_linux_v1.12.13+hotfix.9-stable.tar.xz
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;In this point we have
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;flutter
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;update-your-path&quot;&gt;Update your path&lt;/h3&gt;

&lt;p&gt;You can update your PATH variable for the current session at the command line, but You’ll probably want to update this variable permanently, so you can run flutter commands in any terminal session, this way try:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Determine the directory where you placed the Flutter SDK
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;flutter
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/flutter/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;/home/foo/development/flutter/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Open (or create) the rc file for your shell. For example, Linux uses the Bash shell by default, so edit $HOME/.bashrc. If you are using a different shell, the file path and filename will be different on your machine.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Add the following line in your $HOME/.bashrc:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;export PATH=&quot;$&lt;/span&gt;PATH:/home/foo/development/flutter/bin&lt;span class=&quot;s2&quot;&gt;&quot;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; the PATH &lt;strong&gt;/home/foo/development/flutter/&lt;/strong&gt; should be replaced by your path, so in this case &lt;strong&gt;foo&lt;/strong&gt; is your Linux user.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run source $HOME/.&lt;rc file=&quot;&quot;&gt; to refresh the current window or open a new terminal window to automatically source the file.&lt;/rc&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Verify that the flutter/bin directory is now in your PATH by running:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;Verify that the flutter &lt;span class=&quot;nb&quot;&gt;command &lt;/span&gt;is available by running:
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;which flutter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;If every it’s OKAY, let’s try some commands with Flutter SDK:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;flutter precache
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;flutter doctor
&lt;span class=&quot;go&quot;&gt;[-] Android toolchain - develop for Android devices
    • Android SDK at /Users/obiwan/Library/Android/sdk
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;    ✗ Android SDK is missing command line tools;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;download from https://goo.gl/XxQghQ
&lt;span class=&quot;go&quot;&gt;    • Try re-installing or updating your Android SDK,
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;      visit https://flutter.dev/setup/#&lt;/span&gt;android-setup &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;detailed instructions.
&lt;span class=&quot;go&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Run the last command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-1-install-java&quot;&gt;STEP 1: Install JAVA&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;In case you have Java already installed on your computer, I would suggest you jump to the next step, in other cases let’s install Java 8.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Why Java 8, the new java version, e.g., 10 and 11 has some issues with Flutter checkout https://github.com/flutter/flutter/issues/25811&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Install on Ubuntu:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;openjdk-8-jdk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Install on Fedora:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;JRE
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;dnf &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;java-1.8.0-openjdk
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;JDK
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;dnf &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;java-1.8.0-openjdk-devel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;managing-java&quot;&gt;Managing Java&lt;/h3&gt;

&lt;p&gt;In case, you have other java versions installed, in another way you can jump to the next step. You can configure which version is the default for use on the command line by using the update-alternatives command.&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;update-alternatives &lt;span class=&quot;nt&quot;&gt;--config&lt;/span&gt; java
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;You can do this for other Java commands, such as the compiler (javac):&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;update-alternatives &lt;span class=&quot;nt&quot;&gt;--config&lt;/span&gt; javac
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;step-2-install-android-sdk&quot;&gt;STEP 2: Install Android SDK&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;One easy way to install the Android SDK is to install Android Studio, see https://developer.android.com/studio , but in this post, our focus is to adopt the Visual Code to write our Flutter APPs.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Therefore, we choose to install only the Android SDK, this way you can go to https://developer.android.com/studio in the section Command line tools only and get the Linux version. &lt;strong&gt;Unfortunately&lt;/strong&gt;, we have noted some issues with the latest versions. This way, adopt a specific version of the Android SDK from Google repo:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;NOTE: at this moment, we are inside the development directory
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;unzip sdk-tools-linux-4333796.zip 
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;tools/bin/ 
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Now we’ll install some tools to run our Flutter APPs on Android, e.g., the emulator, OS version and libraries. Thus, we’ll use the sdkmanager tool. This step can take a little time according to your internet speed.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./sdkmanager &lt;span class=&quot;s2&quot;&gt;&quot;tools&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;build-tools;29.0.3&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;emulator&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;platform-tools&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;platforms;android-29&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;system-images;android-29;google_apis_playstore;x86_64&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; At this moment, it’s possible to get some issues to break the Android SDK installation, one example of common issues and solution, you can try and repeat the install:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;No space left on device, details at https://bytefreaks.net/applications/android-studio-no-space-left-on-device , &lt;strong&gt;SOLUTION&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;mount &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; remount,size&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;8G,noatime /tmp&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;OPTIONAL:&lt;/strong&gt; This is optional, but highly recommended, to confirm all licenses from Android SDK.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./sdkmanager &lt;span class=&quot;nt&quot;&gt;--licenses&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;install-android-debug-bridge-adb&quot;&gt;Install Android Debug Bridge (adb)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. More details at https://developer.android.com/studio/command-line/adb&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Install on Ubuntu:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;android-tools-adb 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Install on Fedora:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;dnf &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;adb 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;step-3-update-your-path-with-the-android-sdk&quot;&gt;STEP 3: Update your path with the Android SDK&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Add the following line in your $HOME/.bashrc:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;go&quot;&gt;ANDROID_HOME=/home/foo/development/tools

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;export PATH=$&lt;/span&gt;PATH:&lt;span class=&quot;nv&quot;&gt;$ANDROID_HOME&lt;/span&gt;:&lt;span class=&quot;nv&quot;&gt;$ANDROID_HOME&lt;/span&gt;:&lt;span class=&quot;nv&quot;&gt;$ANDROID_HOME&lt;/span&gt;/tools/bin:&lt;span class=&quot;nv&quot;&gt;$ANDROID_HOME&lt;/span&gt;/platform-tools
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Now to check if Flutter see Android SDK
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;flutter doctor &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-4-install-flutter-plugin-on-visual-code&quot;&gt;STEP 4: Install Flutter plugin on Visual Code&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Opening Visual Code and go to “Extensions” or Ctrl+Shift+X, then in Search look for Flutter and click and install, as follows:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/flutter_plugin_vs.png&quot; alt=&quot;Flutter plugin VS&quot; title=&quot;Flutter plugin VS&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Install Dart plugin on VS still in “Extensions” on Visual Code, for Dart and click and install, as follows:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/dart_plugin_vs.png&quot; alt=&quot;Dart plugin VS&quot; title=&quot;Dart plugin VS&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;We are all ready to write our Flutter APPs using Visual Code on Linux&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-5-create-a-hello-world-app-in-flutter&quot;&gt;STEP 5: Create a Hello World APP in Flutter&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;In the future, I’ll explain in detail the code but for now, we focus on how to run a Flutter APP in our devel environment.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s create a directory (inside development) to organize our APP&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:development/tools/bin/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ../../
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;hello_app 
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;hello_app
&lt;span class=&quot;gp&quot;&gt;foo@bar:development/$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;flutter create &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Creating project .... androidx: true
  android/build.gradle (created)
  android/app/build.gradle (created)
  android/app/src/main/kotlin/com/example/hello_app/MainActivity.kt (created)
  android/hello_app_android.iml (created)
  lib/main.dart (created)
&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;  ...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;  ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
  .metadata (created)
  hello_app.iml (created)
Running &quot;flutter pub get&quot; in hello_app...                           4.0s
Wrote 77 files.
&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;
In order to run your application, type:

&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;  $&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;  $&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;flutter run
&lt;span class=&quot;go&quot;&gt;
Your application code is in ./lib/main.dart.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Opening the source code in the Visual Code, you need to go in the menu File -&amp;gt; Open Folder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;That’s all folks&lt;/strong&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 01 Apr 2020 19:18:00 +0000</pubDate>
        <link>https://hbgit.github.io/flutter/2020/04/01/install-flutter.html</link>
        <guid isPermaLink="true">https://hbgit.github.io/flutter/2020/04/01/install-flutter.html</guid>
        
        
        <category>Flutter</category>
        
      </item>
    
      <item>
        <title>Using AFL and libFuzzer</title>
        <description>&lt;h1 id=&quot;using-afl-and-libfuzzer&quot;&gt;Using AFL and libFuzzer&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;This post is based on text from &lt;a href=&quot;https://blog.f-secure.com/super-awesome-fuzzing-part-one/&quot;&gt;f-secure blog&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The tools for bug hunting have been adopted fuzzing as a very effective technique. In this text, we keep our focus on tools such as &lt;a href=&quot;http://lcamtuf.coredump.cx/afl/&quot;&gt;American Fuzzy Lop&lt;/a&gt; (AFL), &lt;a href=&quot;http://llvm.org/docs/LibFuzzer.html&quot;&gt;LLVM libFuzzer&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;using-afl&quot;&gt;Using AFL&lt;/h2&gt;

&lt;p&gt;For the next steps, we adopted a Linux docker container, aiming to keep a pattern for our commands.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Install docker, checking out this &lt;a href=&quot;[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04]&quot;&gt;LINK&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create our container:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;foo@bar:~$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker run &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; afl ubuntu:18.04 /bin/bash
&lt;span class=&quot;go&quot;&gt;Unable to find image &quot;ubuntu:18.04&quot; locally
18.04: Pulling from library/ubuntu
423ae2b273f4: Pull complete 
de83a2304fa1: Pull complete 
f9a83bce3af0: Pull complete 
b6b53be908de: Pull complete 
&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Install AFL and get the source code of libxml2-utils&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; afl
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;home
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cp&lt;/span&gt; /etc/apt/sources.list /etc/apt/sources.list.bkp
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-Ei&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/^# deb-src /deb-src /&quot;&lt;/span&gt; /etc/apt/sources.list
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get update
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;source &lt;/span&gt;libxml2-utils
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;We configure libxml2 build to use AFL compilers and compile the xmllint utility
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;build-essential &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;automake &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;zlib1g-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;pkg-config &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libtool &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;libxml2-2.9.4+dfsg1/
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./configure &lt;span class=&quot;nv&quot;&gt;CC&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;afl-gcc &lt;span class=&quot;nv&quot;&gt;CXX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;afl-g++
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;in case&lt;/span&gt; of error, try run ./autogen.sh
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;make xmllint
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-as 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[+] Instrumented 18 locations (64-bit, non-hardened mode, ratio 100%).
CC       schematron.lo
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-cc 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-as 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[+] Instrumented 566 locations (64-bit, non-hardened mode, ratio 100%).
CC       xzlib.lo
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-cc 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-as 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;[!] WARNING: No instrumentation targets found.
CCLD     libxml2.la
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-cc 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;ar: `u' modifier ignored since `D' is the default (see `U')
CCLD     xmllint
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;afl-cc 2.52b by &amp;lt;lcamtuf@google.com&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Now we create a sample file (to run AFL fuzzing) with content &amp;lt;a&amp;gt;&amp;lt;/a&amp;gt; for AFL to start with and run the afl-fuzz.
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;in&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt;/sample
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;some flag to skip erros to run afl &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;docker, more details at https://github.com/mirrorer/afl/blob/master/docs/env_variables.txt
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;AFL_SKIP_CPUFREQ&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;./.libs/ afl-fuzz &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; ./in &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; ./out &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; ./.libs/xmllint &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; /dev/null @@
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/afl_run.png&quot; alt=&quot;AFL running&quot; title=&quot;AFL running&quot; /&gt;&lt;/p&gt;

&lt;p&gt;AFL will continue fuzzing indefinitely, writing inputs that trigger new code coverage in ./out/queue/, crash triggering inputs in ./out/crashes/ and inputs causing hangs in /out/hangs/. For more information on how to interpret the AFL’s status screen, see: http://lcamtuf.coredump.cx/afl/status_screen.txt&lt;/p&gt;

&lt;h2 id=&quot;fuzzing-with-llvm-libfuzzer&quot;&gt;Fuzzing with LLVM libFuzzer&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Let’s now adopting LLVM libFuzzer. To start fuzzing, you’ll first need to introduce a target function, &lt;strong&gt;LLVMFuzzerTestOneInput&lt;/strong&gt;, that receives the fuzzed input buffer from libFuzzer. The LibFuzzer implementation works by creating a custom entry point, which contains an array of bytes (of uint8_t). The code looks like this.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class=&quot;language-C&quot;&gt;extern &quot;C&quot; int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
 DoSomethingInterestingWithMyAPI(Data, Size);
 return 0; // Non-zero return values are reserved for future use.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For fuzzing libxml2, Google’s fuzzer test suite provides a good &lt;a href=&quot;https://github.com/google/fuzzer-test-suite/blob/master/libxml2-v2.9.2/target.cc&quot;&gt;example fuzzing function&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-C&quot;&gt;// Copyright 2016 Google Inc. All Rights Reserved.
// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
#include &amp;lt;string&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &quot;libxml/xmlversion.h&quot;
#include &quot;libxml/parser.h&quot;
#include &quot;libxml/HTMLparser.h&quot;
#include &quot;libxml/tree.h&quot;

void ignore (void * ctx, const char * msg, ...) {}

extern &quot;C&quot; int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 xmlSetGenericErrorFunc(NULL, &amp;amp;ignore);
 if (auto doc = xmlReadMemory(reinterpret_cast(data), size, &quot;noname.xml&quot;, NULL, 0))
 xmlFreeDoc(doc);
 return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
  &lt;li&gt;We make our work simple, we adopt the code from GitHub repo. This way, we start from the last step with AFL&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2-2.9.4+dfsg1#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;git &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;git clone https://github.com/GNOME/libxml2 libxml2
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;libxml2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Recent versions of Clang (starting from 6.0) include libFuzzer, and no extra installation is necessary.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In order to build your fuzzer binary, use the -fsanitize=fuzzer flag during the compilation and linking. In most cases, you may want to combine libFuzzer with AddressSanitizer (ASAN), UndefinedBehaviorSanitizer (UBSAN), or both. You can also build with MemorySanitizer (MSAN), but support is experimental:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;clang-6.0 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;dependece of libxml2
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;python-dev &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Setting up FLAGS to build libxml2. Here you could explore different kinds of coverage-guided (using, clang coverage), which tries to maximize the code coverage of a program. For example, the inline-8bit-counters option from LLVM (SanitizerCoverage) for code coverage instrumentation built-in, where the compiler will insert inline counter that should be incremented on every edge.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CXXFLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,trace-pc-guard,trace-cmp&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CXX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;clang++-6.0&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CFLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,trace-pc-guard,trace-cmp&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CC&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;clang-6.0&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;LDFLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,trace-pc-guard,trace-cmp&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Building LIBXML2&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./autogen.sh
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;make
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Now we need to write the libfuzz test, then we adopt from &lt;a href=&quot;https://github.com/google/fuzzer-test-suite/blob/master/libxml2-v2.9.2/target.cc&quot;&gt;Google’s fuzzer test suite&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;wget &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wget https://raw.githubusercontent.com/google/fuzzer-test-suite/master/libxml2-v2.9.2/target.cc
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$CXX&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$CXXFLAGS&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;c++11 target.cc &lt;span class=&quot;nt&quot;&gt;-Iinclude&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-L&lt;/span&gt;.libs &lt;span class=&quot;nt&quot;&gt;-lxml2&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-fsanitize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;fuzzer &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; libxml-fuzzer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Now we are ready to run our fuzzer.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; ./output
&lt;span class=&quot;gp&quot;&gt;root@a3cbc72a4874:/home/libxml2#&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;./libxml-fuzzer ./output/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/lib_fuzzer_01.png&quot; alt=&quot;LibFuzzer running&quot; title=&quot;LibFuzzer running&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;All inputs that trigger new coverage are stored as sample files in ./output. As libFuzzer runs in-process, if a bug is found, it saves the test case and exits. For more information on how to interpret the output to see: http://llvm.org/docs/LibFuzzer.html#output&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Wed, 11 Mar 2020 16:36:00 +0000</pubDate>
        <link>https://hbgit.github.io/vvt/2020/03/11/fuzzer.html</link>
        <guid isPermaLink="true">https://hbgit.github.io/vvt/2020/03/11/fuzzer.html</guid>
        
        
        <category>VVT</category>
        
      </item>
    
      <item>
        <title>Welcome!</title>
        <description>&lt;p&gt;Hello, I am &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Herbert Oliveira Rocha&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Currently, I am a professor in the Departament of Computer Science at 
&lt;a href=&quot;http://ufrr.br/dcc&quot;&gt;Federal University of Roraima&lt;/a&gt;. My research focuses on the development of automated verification and software testing techniques for software systems. In particular, I am interested in the verification and testing of the critical embedded systems.&lt;/p&gt;

&lt;p&gt;INTERESTS IN COMPUTING:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Software Quality&lt;/li&gt;
  &lt;li&gt;Verification and Validation of Software&lt;/li&gt;
  &lt;li&gt;Testing Software&lt;/li&gt;
  &lt;li&gt;Model Checking&lt;/li&gt;
  &lt;li&gt;Embedded Systems&lt;/li&gt;
  &lt;li&gt;Operating Systems&lt;/li&gt;
  &lt;li&gt;Open-Source&lt;/li&gt;
  &lt;li&gt;Programming Languages&lt;/li&gt;
  &lt;li&gt;Regular Expressions&lt;/li&gt;
  &lt;li&gt;Web Systems, and&lt;/li&gt;
  &lt;li&gt;Design and Art&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Mon, 11 Feb 2019 16:36:00 +0000</pubDate>
        <link>https://hbgit.github.io/news/2019/02/11/welcome.html</link>
        <guid isPermaLink="true">https://hbgit.github.io/news/2019/02/11/welcome.html</guid>
        
        
        <category>news</category>
        
      </item>
    
  </channel>
</rss>
