Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions indent/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!indent-1.9.1.tar.gz
!inputs
!outputs
!test.sh
35 changes: 35 additions & 0 deletions indent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:16.04

# create docker user
RUN apt-get update \
&& apt-get install --no-install-recommends -y sudo \
&& useradd -ms /bin/bash docker \
&& echo 'docker ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& adduser docker sudo \
&& apt-get clean \
&& mkdir -p /home/docker \
&& sudo chown -R docker /home/docker \
&& sudo chown -R docker /usr/local/bin \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER docker

# install dependencies
RUN sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
gcc \
libc6-dev \
gcovr \
build-essential \
bison \
&& sudo apt-get clean \
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /experiment
COPY . /experiment/
RUN sudo chown -R docker . /tmp \
&& tar -xf indent-1.9.1.tar.gz \
&& rm indent-1.9.1.tar.gz \
&& mv indent-1.9.1 source \
&& cd source \
&& ./configure \
&& make -j4 CFLAGS="-std=c90"
37 changes: 37 additions & 0 deletions indent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
indent 1.9.1
============

Unix source code processing utility. This benchmark and its test
inputs are taken from Miller et al.'s work on fuzz testing.

**Bug:** Infinite loop.

Files
-----

indent-1.9.1.tar.gz: original indent source code

indent_comb.c: combined source code on which modify operates

output.t1:
output.t2:
output.t3:
output.t4:
output.t5:
output.t6:
output.t7: Reference output for test cases

t1:
t2:
t3:
t4:
t5:
t7: input files for tests. "Random" (taken from fuzz testing work). t7 is the
bad test.

test-bad.sh: "bad test" script. Passes t7 to the variant under test and outputs
"t7" to the output file if the program terminates without crashing.

test-good.sh: "good tests" script. Calls variant on 5 other inputs on which
unmodified indent works fine and, if the output matches the reference output,
outputs a line per passed test to the passed in output file.
Binary file added indent/indent-1.9.1.tar.gz
Binary file not shown.
30 changes: 30 additions & 0 deletions indent/indent.bugzoo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "1.0"

blueprints:
- type: docker
tag: squareslab/tse2012:indent

bugs:
- name: tse2012:indent
dataset: tse2012
program: flex
image: squareslab/tse2012:indent
languages:
- c
source-location: /experiment/source
compiler:
time-limit: 20
type: simple
context: /experiment/source
command: make CFLAGS="-std=c90"
command_clean: make clean
command_with_instrumentation: |
make CFLAGS="-std=c90 --coverage" LDFLAGS="--coverage"
coverage:
files-to-instrument:
- indent.c
test-harness:
failing: 1
passing: 5
time-limit: 5
type: genprog
6 changes: 6 additions & 0 deletions indent/inputs/n1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@8��+�)���8��9���dD�@EN��kGZ�����" Ш0~��ƈ �����k\�16=�4�eˀm�(�d �e5��qO�:��j)�ć=����EA�n�I��3�ƣ�G
*$����y%)��R�W���z^�€��"��>�;�N���������V�3�A�����1܋A�{y�Hq��`,�n�ءX�����pO���C�a�n��8S��㠚;�qRq~��� ?O'Q���luC^{z0�x�M�����~�,n��-�ܒ�.�Op���v�B�hNs�� �� ���\qi����LvIBW��LQ��*ڎ�cL�#�g �o$�/����Z������ N������� !���O#==*����2 �&:�sb!�V@J��֋�hD ց���:�
�Ǩo�a��� �J������b�~��N�Wb��PN�Ϭ��9Nv��How���qr���P�{�Z�iz]��
m 5�;��gW���$�|�9w�!�{�#���C\Cv� |s"Rs��k�z�X��vRop��ğ� bL6��1:,T*���G��ŋ(���Îq��C0�
�u¦w�y8˺��l�v�c9�S��܆�� ��E�*�hd���6���� c�]|�>�hc�|�K�� )�}�X�� �O#&1.,�����"�)P�5L�7�8�^��,��\k��*��J�f�ގ��_���l�v7�=E���LY+c���^�����~/'���{w��"�3�:��[���.w�j��H����M�5/Ǡ�nC򴤟�*�G�aN^�{�Վ���$����Mă��R�����Ū������:�#R�Q4 #Xg�J���](؇�����߫�����&�*
�~ڢ��I�=#��<#ڼ�y����Pf���qZ��� �j�(S�ɦ�H"A�\GW���Ae��s��\b�.��(�IE c R�vhv3k��^�
Expand Down
Binary file added indent/inputs/p1
Binary file not shown.
Binary file added indent/inputs/p2
Binary file not shown.
Binary file added indent/inputs/p3
Binary file not shown.
Binary file added indent/inputs/p4
Binary file not shown.
Binary file added indent/inputs/p5
Binary file not shown.
7 changes: 7 additions & 0 deletions indent/outputs/n1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
indent:Standard input:1: Warning: Extra )
indent:Standard input:1: Error: Unterminated string constant
indent:Standard input:2: Warning: Extra )
indent:Standard input:2: Error: Unterminated string constant
indent:Standard input:3: Warning: Extra ]
indent:Standard input:5: Warning: Extra ]
indent:Standard input:5: Warning: Extra )
Loading