[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-bugs] https://github.com/csmith-project/csmith/blob/master/src/Function.cpp



I believe you have a typo on line 351, vs[0] should be vs[i]

 

 

static void

GenerateParameterListFromString(Function &currFunc, const string &params_string)

{

vector<string> vs;

StringUtils::split_string(params_string, vs, ",");

int params_cnt = vs.size();

assert((params_cnt > 0) && "Invalid params_string!");

if ((params_cnt == 1) && (vs[0] == "Void")) {

return;

}

for (int i = 0; i < params_cnt; i++) {

assert((vs[i] != "Void") && "Invalid parameter type!");

CVQualifiers qfer;

qfer.add_qualifiers(false, false);

const Type *ty = Type::get_type_from_string(vs[0]);

Variable *v = VariableSelector::GenerateParameterVariable(ty, &qfer);

assert(v);

currFunc.param.push_back(v);

}

}

 

************* Email Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!