Skip to content

Commit

Permalink
refactor(c): refactoring flex benchmarks (#50)
Browse files Browse the repository at this point in the history
* refactor: flex-1

* refactor: flex-2

* refactor: flex-3

* refactor: flex-4

* refactor: flex-5

* refactor: flex-6

* refactor: remove old source codes
  • Loading branch information
henrylee97 authored Nov 10, 2023
1 parent b534cd2 commit a835fcd
Show file tree
Hide file tree
Showing 274 changed files with 330 additions and 69,485 deletions.
2 changes: 2 additions & 0 deletions C/flex-1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-1/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/buf.c",
"line": 175
},
"sink": {
"file": "src/buf.c",
"line": 182
}
}
}
2 changes: 2 additions & 0 deletions C/flex-2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/buf.c",
"line": 196
},
"sink": {
"file": "src/buf.c",
"line": 203
}
}
}
2 changes: 2 additions & 0 deletions C/flex-3/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-3/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/dfa.c",
"line": 285
},
"sink": {
"file": "src/dfa.c",
"line": 298
}
}
}
2 changes: 2 additions & 0 deletions C/flex-4/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-4/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/misc.c",
"line": 109
},
"sink": {
"file": "src/misc.c",
"line": 111
}
}
}
2 changes: 2 additions & 0 deletions C/flex-5/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-5/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/sym.c",
"line": 120
},
"sink": {
"file": "src/sym.c",
"line": 120
}
}
}
2 changes: 2 additions & 0 deletions C/flex-6/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dockerignore
Dockerfile
30 changes: 30 additions & 0 deletions C/flex-6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
autopoint \
bison \
build-essential \
ca-certificates \
flex \
git \
jq \
libtool \
texinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workspace
COPY . /workspace
WORKDIR /workspace

RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".buggyPath") \
&& git clone https://github.com/westes/flex.git $BUGGY_PATH \
&& cd $BUGGY_PATH \
&& git checkout d3de49f84224b18c5287653f20525291b24cc26e \
&& ./autogen.sh \
&& ./configure

23 changes: 23 additions & 0 deletions C/flex-6/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"language": "c",
"id": "flex-1",

"buggyPath": "buggy",
"referencePath": null,

"buildCommand": "make -j`nproc`",
"testCommand": null,

"categories": ["safety", "memory-leak"],

"leak": {
"source": {
"file": "src/sym.c",
"line": 180
},
"sink": {
"file": "src/sym.c",
"line": 180
}
}
}
15 changes: 0 additions & 15 deletions safety/C/projects/flex/.indent.pro

This file was deleted.

Loading

0 comments on commit a835fcd

Please sign in to comment.