xoreaxeaxeax / sandsifter

The x86 processor fuzzer
BSD 3-Clause "New" or "Revised" License
4.89k stars 349 forks source link

Make issue on ubuntu. #81

Open HiddenRoom opened 2 years ago

HiddenRoom commented 2 years ago

running "make" in sandsifter directory gives this output

cc -c injector.c -o injector.o -Wall injector.c:171:13: error: variably modified ‘stack’ at file scope 171 | static char stack[SIGSTKSZ]; | ^~~~~ In file included from /usr/include/signal.h:328, from injector.c:12: injector.c:172:27: error: initializer element is not constant 172 | stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; | ^~~~ injector.c:172:27: note: (near initialization for ‘ss.ss_size’) injector.c:321:100: warning: excess elements in array initializer 321 | .start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0}, | ^~~~ injector.c:321:100: note: (near initialization for ‘total_range.start.bytes’) injector.c:322:98: warning: excess elements in array initializer 322 | .end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0}, | ^~~~ injector.c:322:98: note: (near initialization for ‘total_range.end.bytes’) make: *** [Makefile:38: injector.o] Error 1

NobodyFAH commented 1 year ago

same problem here

did you find a solution?

HiddenRoom commented 1 year ago

SOLVED!!! The issue was due to a change in glibc to the define in signal.h making SIGSTKSZ not a constant so you have to write a separate program to print it out (example below) then replace every instance of SIGSTKSZ in injector.c with the constant printed. Additionally you must add -no-pie to CFLAGS in the Makefile.

to find what you should replace SIGSTKSZ with run

`#include

include

int main(void) { printf("%d\n", SIGSTKSZ); return 0; }`

ilikenwf commented 6 months ago

Make a pull request or fork

TheBloodEaglez commented 4 months ago

I'm on ubuntu 22.04 I did all this, I couldn't install libcapstone3 ( I could install libacpstone 4). I got this output sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t File "/home/david/Downloads/yods/sandsifter-master/./sifter.py", line 196 if type(x) not in [type(0), type(0L)]: ^ SyntaxError: invalid decimal literal don't know if anyone knows how to solve?

SOLVED!!! The issue was due to a change in glibc to the define in signal.h making SIGSTKSZ not a constant so you have to write a separate program to print it out (example below) then replace every instance of SIGSTKSZ in injector.c with the constant printed. Additionally you must add -no-pie to CFLAGS in the Makefile.

to find what you should replace SIGSTKSZ with run

`#include #include

int main(void) { printf("%d\n", SIGSTKSZ); return 0; }`

doug65536 commented 3 weeks ago

I know how, install Python 2.7. Good luck with that. Some jerks want to save 100's of KB of your disk space. This code is broken garbage on ubuntu.