You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the csmith will generate a code without 'main' function (This may because of too many args ). When this happens, delay*.o will not have a 'slp' symbol and bring failure when linking it with test.o
change the function ch_main_arg to this:
def ch_main_arg(pn, argname, funcname):
# change main function name with random_string name
modify_flag = 0
for line in fileinput.input(pn, inplace=True):
if "int main" in line:
line = line.replace("void", "%s" % argname)
line = line.replace("main", "%s" % funcname)
modify_flag = 1
if "int print_hash_value = 0;" in line:
#line = line.replace("0", "1")
continue
if "print_hash_value" in line:
continue
sys.stdout.write(line)
return modify_flag
and change line 116 to :
if not ch_main_arg(var[1], argname, funcname):
continue
That works for me when fail running python randomcode.py for the first time. Hope it helps.
The text was updated successfully, but these errors were encountered:
Sometimes the csmith will generate a code without 'main' function (This may because of too many args ). When this happens, delay*.o will not have a 'slp' symbol and bring failure when linking it with test.o
change the function ch_main_arg to this:
and change line 116 to :
That works for me when fail running
python randomcode.py
for the first time. Hope it helps.The text was updated successfully, but these errors were encountered: