Open CityOfLight77 opened 3 years ago
Hmm, interesting, I haven't seen this issue before. I recently pushed some fixes to get it setup on 20.04. Can you try again and see if this issue still persists? I tested with 20.04 and Clang-10. There is a docker image with a setup for focal that you can get using the instructions here
Hmm, interesting, I haven't seen this issue before. I recently pushed some fixes to get it setup on 20.04. Can you try again and see if this issue still persists? I tested with 20.04 and Clang-10. There is a docker image with a setup for focal that you can get using the instructions here
Now I can compile gramatron on ubuntu focal, thanks But I can't compile gramatron on newest AFL++ as custom mutator
...
...
[+] Json-c successfully prepared!
[+] Builing gramatron now.
gramfuzz.c:48:39: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
parsed_json = json_object_from_file(automaton_file);
^~~~~~~~~~~~~~
./json-c/json_util.h:43:67: note: passing argument to parameter 'filename' here
JSON_EXPORT struct json_object* json_object_from_file(const char *filename);
^
gramfuzz.c:165:22: warning: passing 'char *' to parameter of type 'u8 *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
pda = create_pda(automaton_file);
^~~~~~~~~~~~~~
gramfuzz.c:38:23: note: passing argument to parameter 'automaton_file' here
state *create_pda(u8 *automaton_file) {
^
gramfuzz.c:293:16: warning: passing 'const uint8_t *' (aka 'const unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (unlink(filename_new_queue)) {
^~~~~~~~~~~~~~~~~~
/usr/include/unistd.h:825:32: note: passing argument to parameter '__name' here
extern int unlink (const char *__name) __THROW __nonnull ((1));
^
gramfuzz.c:300:15: warning: passing 'const uint8_t *' (aka 'const unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
fd = open(filename_new_queue, O_WRONLY | O_CREAT | O_TRUNC,
^~~~~~~~~~~~~~~~~~
/usr/include/fcntl.h:168:30: note: passing argument to parameter '__file' here
extern int open (const char *__file, int __oflag, ...) __nonnull ((1));
^
4 warnings generated.
gramfuzz-util.c:161:10: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
strcpy(unparsed, term_ptr->symbol);
^~~~~~~~
/usr/include/string.h:122:39: note: passing argument to parameter '__dest' here
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
gramfuzz-util.c:166:12: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
strcat(unparsed, term_ptr->symbol);
^~~~~~~~
/usr/include/string.h:130:39: note: passing argument to parameter '__dest' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
^
gramfuzz-util.c:180:14: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if (access(fn, F_OK) != -1) { return; }
^~
/usr/include/unistd.h:287:32: note: passing argument to parameter '__name' here
extern int access (const char *__name, int __type) __THROW __nonnull ((1));
^
gramfuzz-util.c:182:14: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
fp = fopen(fn, "wbx+");
^~
/usr/include/stdio.h:246:44: note: passing argument to parameter '__filename' here
extern FILE *fopen (const char *__restrict __filename,
^
gramfuzz-util.c:255:14: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
fp = fopen(fn, "rb");
^~
/usr/include/stdio.h:246:44: note: passing argument to parameter '__filename' here
extern FILE *fopen (const char *__restrict __filename,
^
5 warnings generated.
/usr/bin/ld: ../../src/afl-performance.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I got error when running
setup.sh
script. I'm on ubuntu 20.04 with clang 12Here is the log