Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzing config #2

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TUNE8DBS_EXE = tune8dbs

# --- Libraries

LDFLAGS = -static -lm -lz
LDFLAGS = -lm -lz -Wl,--wrap=time
#LDFLAGS = -static -lm -lz -Wl,-Map,map.out


Expand All @@ -125,7 +125,7 @@ CXX = g++
DEFS = -DINCLUDE_BOOKTOOL -DTEXT_BASED -DZLIB_STATIC

WARNINGS = -Wall -Wcast-align -Wwrite-strings -Wstrict-prototypes -Winline
OPTS = -O4 -s -fomit-frame-pointer -falign-functions=32
OPTS = -O4 -g -fsanitize=address,undefined -static-libasan -fno-omit-frame-pointer
#OPTS = -O4 -s -fomit-frame-pointer -mtune=core2 -falign-functions=32

CFLAGS = $(OPTS) $(WARNINGS) $(DEFS)
Expand Down
1 change: 1 addition & 0 deletions booktool.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/


#include "wrap_time.h"

#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions enddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Contents:
*/

#include "wrap_time.h"


#include <assert.h>
Expand Down
2 changes: 1 addition & 1 deletion practice.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Contents: A small utility which enables the user to browse
an opening book file.
*/

#include "wrap_time.h"

#include <stdio.h>
#include <stdlib.h>
Expand Down
5 changes: 3 additions & 2 deletions tune8dbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
errors.
*/

#include "wrap_time.h"

#include <math.h>
#include <stdio.h>
Expand Down Expand Up @@ -1146,7 +1147,7 @@ void pattern_setup( void ) {
int pos;
int pattern, mirror_pattern;
int power3;
int flip8[6561], flip5[81], flip3[27];
int flip8[6561], flip5[243], flip3[27];
int row[10];

/* The inverse patterns */
Expand Down Expand Up @@ -1887,7 +1888,7 @@ int main(int argc, char *argv[]) {
if ( USE_PARITY )
parity.gradient = 0.0;
if ( USE_A_FILE2X )
for ( i = 0; i < 59059; i++ )
for ( i = 0; i < 59049; i++ )
afile2x[i].gradient = 0.0;
if ( USE_CORNER52 )
for ( i = 0; i < 59049; i++ )
Expand Down
14 changes: 14 additions & 0 deletions wrap_time.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef WRAP_TIME_H
#define WRAP_TIME_H

long __wrap_time(long *__timer) {
static long time = 100;
time += 1;
long result = time / 100;
if (__timer != 0) {
*__timer = result;
}
return result;
}

#endif // WRAP_TIME_H
1 change: 1 addition & 0 deletions zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@



#include "wrap_time.h"
#include <ctype.h>
#include <math.h>
#include <stdio.h>
Expand Down