diff --git a/CodeHawk/CHB/bchcmdline/bCHXMakeLibSummary.ml b/CodeHawk/CHB/bchcmdline/bCHXMakeLibSummary.ml index 746394a38..89d8bbec6 100644 --- a/CodeHawk/CHB/bchcmdline/bCHXMakeLibSummary.ml +++ b/CodeHawk/CHB/bchcmdline/bCHXMakeLibSummary.ml @@ -173,18 +173,7 @@ let write_xml_postconditions (node:xml_element_int) = begin pNode#setAttribute "name" p; pNode :: acc end) pNodes !enumpost in append pNodes -let write_xml_sideeffects (node:xml_element_int) = - if !sets_errno then - let sNode = xmlElement "sideeffect" in - let mNode = xmlElement "math" in - let eNode = xmlElement "sets-errno" in - begin - sNode#appendChildren [mNode]; - mNode#appendChildren [eNode]; - node#appendChildren [sNode] - end - else - () +let write_xml_sideeffects (_node:xml_element_int) = () let write_xml_io_actions (node:xml_element_int) _parameters = if !iox_cat = "" then () else @@ -216,6 +205,7 @@ let write_xml_summary (node:xml_element_int) parameters = begin write_xml_doc docNode parameters; write_xml_api apiNode parameters; + (if !sets_errno then semNode#setAttribute "sets-errno" "yes"); write_xml_sem semNode parameters; append [docNode; apiNode; semNode] end diff --git a/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.ml b/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.ml index 437509c6e..592b70656 100644 --- a/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.ml +++ b/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.ml @@ -25,6 +25,17 @@ SOFTWARE. ============================================================================= *) +(* Input path: attributes → function semantics (preconditions, side effects, + postconditions). + + Accepted attribute forms: + - GCC compatibility (read-only; never emitted on output): + access, nonnull, format + - Canonical CodeHawk forms (input and output): + chk_pre, chk_se, chk_post + + See bCHFunctionSemanticsAttributes.ml for the output path. *) + (* chutil *) open CHLogger open CHTraceResult @@ -215,6 +226,63 @@ let get_not_null_precondition attrparams_to_string "argparams" argparams] +let get_nonnull_preconditions + (fparams: fts_parameter_t list) + (attrparams: b_attrparam_t list): xxpredicate_t list = + match attrparams with + | [] -> + (* bare nonnull: all pointer parameters must be non-null *) + List.filter_map (fun par -> + if is_pointer par.apar_type then + Some (XXNotNull (ArgValue par)) + else + None) fparams + | _ -> + (* indexed nonnull: listed parameters must be non-null *) + List.filter_map (fun attrparam -> + match attrparam with + | AInt index -> + TR.tfold + ~ok:(fun par -> Some (XXNotNull (ArgValue par))) + ~error:(fun _ -> None) + (get_par fparams index) + | _ -> None) attrparams + + +let get_format_preconditions + (name: string) + (fparams: fts_parameter_t list) + (attrparams: b_attrparam_t list): xxpredicate_t list = + match attrparams with + | ACons (archetype, []) :: AInt string_index :: _ -> + let mk_pre constructor = + TR.tfold + ~ok:(fun par -> [constructor (ArgValue par)]) + ~error:(fun _ -> []) + (get_par fparams string_index) in + (match archetype with + | "printf" | "gnu_printf" -> mk_pre (fun t -> XXOutputFormatString t) + | "scanf" | "gnu_scanf" -> mk_pre (fun t -> XXInputFormatString t) + | _ -> + begin + log_diagnostics_result + ~tag:"get_format_preconditions:archetype not handled" + ~msg:name + __FILE__ __LINE__ + ["archetype: " ^ archetype]; + [] + end) + | _ -> + begin + log_diagnostics_result + ~tag:"get_format_preconditions:params not recognized" + ~msg:name + __FILE__ __LINE__ + [attrparams_to_string "attrparams" attrparams]; + [] + end + + let get_null_terminated_precondition (fparams: fts_parameter_t list) (tagparams: b_attrparam_t list) @@ -265,6 +333,140 @@ let get_trusted_os_cmd_fmt_string_precondition attrparams_to_string "argparams" argparams] +let string_to_relational_op (s: string): relational_op_t traceresult = + match s with + | "eq" -> Ok PEquals + | "lt" -> Ok PLessThan + | "leq" -> Ok PLessEqual + | "gt" -> Ok PGreaterThan + | "geq" -> Ok PGreaterEqual + | "neq" -> Ok PNotEqual + | _ -> Error [(elocm __LINE__) ^ "Unknown relational operator: " ^ s] + + +let get_input_format_string_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXInputFormatString (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "input_format_string params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_not_zero_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXNotZero (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "not_zero params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_non_negative_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXNonNegative (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "non_negative params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_relational_expr_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([ACons (opstr, [])], [AInt index1; AInt index2]) -> + let* op = string_to_relational_op opstr in + let* par1 = get_par fparams index1 in + let* par2 = get_par fparams index2 in + Ok (XXRelationalExpr (op, ArgValue par1, ArgValue par2)) + | _ -> + Error [(elocm __LINE__) ^ "relational_expr params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_no_overlap_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt index1; AInt index2]) -> + let* par1 = get_par fparams index1 in + let* par2 = get_par fparams index2 in + Ok (XXNoOverlap (ArgValue par1, ArgValue par2)) + | _ -> + Error [(elocm __LINE__) ^ "no_overlap params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_allocation_base_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXAllocationBase (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "allocation_base params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_trusted_string_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXTrustedString (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "trusted_string params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_trusted_os_cmd_string_precondition + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXTrustedOsCmdString (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "trusted_os_cmd_string params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + let get_chk_pre_conditions (name: string) (fparams: fts_parameter_t list) @@ -368,6 +570,118 @@ let get_chk_pre_conditions end) (get_trusted_os_cmd_fmt_string_precondition fparams tagparams argparams) + | (ACons ("input_format_string", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:input_format_string" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_input_format_string_precondition fparams tagparams argparams) + + | (ACons ("not_zero", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:not_zero" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_not_zero_precondition fparams tagparams argparams) + + | (ACons ("non_negative", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:non_negative" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_non_negative_precondition fparams tagparams argparams) + + | (ACons ("relational_expr", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:relational_expr" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_relational_expr_precondition fparams tagparams argparams) + + | (ACons ("no_overlap", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:no_overlap" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_no_overlap_precondition fparams tagparams argparams) + + | (ACons ("allocation_base", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:allocation_base" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_allocation_base_precondition fparams tagparams argparams) + + | (ACons ("trusted_string", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:trusted_string" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_trusted_string_precondition fparams tagparams argparams) + + | (ACons ("trusted_os_cmd_string", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xpre -> [xpre]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_preconditions:trusted_os_cmd_string" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_trusted_os_cmd_string_precondition fparams tagparams argparams) + | (ACons (tag, _)) :: _ -> begin log_diagnostics_result @@ -486,6 +800,172 @@ let get_deref_write_sideeffect attrparams_to_string "argparams" argparams] +let get_freed_sideeffect + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXFreed (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "freed params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_modifies_sideeffect + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXModified (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "modifies params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_invalidates_sideeffect + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + Ok (XXInvalidated (ArgValue par)) + | _ -> + Error [(elocm __LINE__) ^ "invalidates params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_deref_write_null_sideeffect + (fparams: fts_parameter_t list) + (tagparams: b_attrparam_t list) + (argparams: b_attrparam_t list): xxpredicate_t traceresult = + match (tagparams, argparams) with + | ([], [AInt refindex]) -> + let* par = get_par fparams refindex in + let* ty = get_derefty par in + let pval = ArgValue par in + Ok (XXConditional (XXNotNull pval, XXBlockWrite (ty, pval, RunTimeValue))) + + | ([], [AInt refindex; AInt sizeindex]) -> + let* bufferparam = get_par fparams refindex in + let* sizeparam = get_par fparams sizeindex in + let* ty = get_derefty bufferparam in + let pval = ArgValue bufferparam in + Ok (XXConditional (XXNotNull pval, XXBlockWrite (ty, pval, ArgValue sizeparam))) + + | _ -> + Error [(elocm __LINE__) ^ "deref_write_null params not recognized"; + fparams_to_string fparams; + attrparams_to_string "tagparams" tagparams; + attrparams_to_string "argparams" argparams] + + +let get_chk_se_conditions + (name: string) + (fparams: fts_parameter_t list) + (attrparams: b_attrparam_t list): xxpredicate_t list = + match attrparams with + | (ACons ("deref_write", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xse -> [xse]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_se_conditions:deref_write" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_deref_write_sideeffect fparams tagparams argparams) + + | (ACons ("deref_write_null", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xse -> [xse]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_se_conditions:deref_write_null" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_deref_write_null_sideeffect fparams tagparams argparams) + + | (ACons ("freed", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xse -> [xse]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_se_conditions:freed" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_freed_sideeffect fparams tagparams argparams) + + | (ACons ("modifies", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xse -> [xse]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_se_conditions:modifies" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_modifies_sideeffect fparams tagparams argparams) + + | (ACons ("invalidates", tagparams)) :: argparams -> + TR.tfold + ~ok:(fun xse -> [xse]) + ~error:(fun e -> + begin + log_error_result + ~tag:"get_chk_se_conditions:invalidates" + ~msg:name + __FILE__ __LINE__ + [String.concat ", " e]; + [] + end) + (get_invalidates_sideeffect fparams tagparams argparams) + + | (ACons (tag, _)) :: _ -> + begin + log_diagnostics_result + ~tag:"get_chk_se_conditions:tag not recognized" + ~msg:name + __FILE__ __LINE__ + ["tag: " ^ tag]; + [] + end + + | _ -> + begin + log_diagnostics_result + ~tag:"get_chk_se_conditions:not recognized" + ~msg:name + __FILE__ __LINE__ + [fparams_to_string fparams; attrparams_to_string "attrparams" attrparams]; + [] + end + + let get_access_sideeffect (name: string) (fparams: fts_parameter_t list) @@ -528,23 +1008,159 @@ let get_access_sideeffect end +let get_chk_post_one + (name: string) + (fparams: fts_parameter_t list) + (attrparams: b_attrparam_t list): xxpredicate_t list = + let thisf = NamedConstant name in + let rv = ReturnValue thisf in + let zero = NumConstant CHNumerical.numerical_zero in + (* Resolve target term: bare predicate → return value; predicate + AInt → parameter *) + let target_result = + match attrparams with + | [ACons (pred, [])] -> Ok (pred, rv) + | [ACons (pred, []); AInt refindex] -> + let* par = get_par fparams refindex in + Ok (pred, ArgValue par) + | (ACons (tag, _)) :: _ -> + Error [(elocm __LINE__) ^ "chk_post tag not recognized: " ^ tag] + | _ -> + Error [(elocm __LINE__) ^ "chk_post params not recognized"; + attrparams_to_string "attrparams" attrparams] in + TR.tfold + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"get_chk_post_one:not recognized" + ~msg:name + __FILE__ __LINE__ + e; + [] + end) + ~ok:(fun (pred, target) -> + let negone = NumConstant (CHNumerical.mkNumerical (-1)) in + match pred with + | "not_null" -> [XXNotNull target] + | "null" -> [XXNull target] + | "non_negative" -> [XXNonNegative target] + | "not_zero" -> [XXNotZero target] + | "positive" -> [XXPositive target] + | "null_terminated" -> [XXNullTerminated target] + | "new_memory" -> [XXNewMemory (target, RunTimeValue)] + | "allocation_base" -> [XXAllocationBase target] + | "trusted_string" -> [XXTrustedString target] + | "trusted_os_cmd_string" -> [XXTrustedOsCmdString target] + | "tainted" -> [XXTainted target] + | "negone" -> [XXRelationalExpr (PEquals, target, negone)] + | "zero" -> [XXRelationalExpr (PEquals, target, zero)] + | "negative" -> [XXRelationalExpr (PLessThan, target, zero)] + | "nonpositive" -> [XXRelationalExpr (PLessEqual, target, zero)] + | tag -> + begin + log_diagnostics_result + ~tag:"get_chk_post_one:tag not recognized" + ~msg:name + __FILE__ __LINE__ + ["tag: " ^ tag]; + [] + end) + target_result + + +let get_chk_qual_conditions + (name: string) + (attrparams: b_attrparam_t list) + (xqual: function_qualifiers_t): function_qualifiers_t = + match attrparams with + | [ACons ("sets_errno", [])] -> + {xqual with fq_sets_errno = Some true} + + | [ACons ("must_use_return", [])] -> + {xqual with fq_must_use_return = Some true} + + | (ACons (tag, _)) :: _ -> + begin + log_diagnostics_result + ~tag:"get_chk_qual_conditions:tag not recognized" + ~msg:name + __FILE__ __LINE__ + ["tag: " ^ tag]; + xqual + end + + | _ -> + begin + log_diagnostics_result + ~tag:"get_chk_qual_conditions:not recognized" + ~msg:name + __FILE__ __LINE__ + [attrparams_to_string "attrparams" attrparams]; + xqual + end + + let convert_b_attributes_to_function_conditions (fintf: function_interface_t) (attrs: b_attributes_t): - (xxpredicate_t list * xxpredicate_t list * xxpredicate_t list) = + (xxpredicate_t list + * xxpredicate_t list + * xxpredicate_t list + * xxpredicate_t list + * function_qualifiers_t) = let fparameters = get_fts_parameters fintf in let name = fintf.fintf_name in + let empty_qualifiers = { + fq_noreturn = None; + fq_functional = None; + fq_sets_errno = None; + fq_must_use_return = None } in - List.fold_left (fun ((xpre, xside, xpost) as acc) attr -> + List.fold_left (fun ((xpre, xside, xpost, xepost, xqual) as acc) attr -> match attr with - | Attr (("acccess" | "chk_access"), attrparams) -> + | Attr (("access" | "chk_access"), attrparams) -> + (* keep chk_access for now for back-compatibility reasons *) let pre = get_access_preconditions name fparameters attrparams in let side = get_access_sideeffect name fparameters attrparams in - (pre @ xpre, side @ xside, xpost) + (pre @ xpre, side @ xside, xpost, xepost, xqual) + + | Attr ("nonnull", attrparams) -> + let pre = get_nonnull_preconditions fparameters attrparams in + (pre @ xpre, xside, xpost, xepost, xqual) + + | Attr ("format", attrparams) -> + let pre = get_format_preconditions name fparameters attrparams in + (pre @ xpre, xside, xpost, xepost, xqual) + + | Attr ("noreturn", []) -> + (xpre, xside, xpost, xepost, {xqual with fq_noreturn = Some true}) + + | Attr ("pure", []) -> + (xpre, xside, xpost, xepost, {xqual with fq_functional = Some FPure}) + + | Attr ("const", []) -> + (xpre, xside, xpost, xepost, {xqual with fq_functional = Some FConst}) + + | Attr ("warn_unused_result", []) -> + (xpre, xside, xpost, xepost, {xqual with fq_must_use_return = Some true}) | Attr ("chk_pre", attrparams) -> let pre = get_chk_pre_conditions name fparameters attrparams in - (pre @ xpre, xside, xpost) + (pre @ xpre, xside, xpost, xepost, xqual) + + | Attr ("chk_se", attrparams) -> + let side = get_chk_se_conditions name fparameters attrparams in + (xpre, side @ xside, xpost, xepost, xqual) + + | Attr ("chk_post", attrparams) -> + let post = get_chk_post_one name fparameters attrparams in + (xpre, xside, post @ xpost, xepost, xqual) + + | Attr ("chk_epost", attrparams) -> + let epost = get_chk_post_one name fparameters attrparams in + (xpre, xside, xpost, epost @ xepost, xqual) + + | Attr ("chk_qual", attrparams) -> + (xpre, xside, xpost, xepost, get_chk_qual_conditions name attrparams xqual) | Attr (attrname, _) -> begin @@ -554,4 +1170,4 @@ let convert_b_attributes_to_function_conditions __FILE__ __LINE__ ["attrname: " ^ attrname]; acc - end) ([], [], []) attrs + end) ([], [], [], [], empty_qualifiers) attrs diff --git a/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.mli b/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.mli index 624b45b09..496b411a7 100644 --- a/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.mli +++ b/CodeHawk/CHB/bchlib/bCHAttributesFunctionSemantics.mli @@ -31,58 +31,412 @@ open BCHLibTypes (** {1 Function attributes} *) -(** Function declarations in C can be decorated with attributes. These attributes - are generally used to allow certain compiler optimizations - (https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html). Here - we use them to communicate preconditions about dynamically linked library - functions. +(** Function declarations in C can be decorated with attributes to communicate + preconditions, side effects, and postconditions about dynamically linked + library functions to the analyzer. - For many standard libc library functions the analyzer has comprehensive + For many standard libc library functions the analyzer has a comprehensive collection of (hand-made) function summaries that include pre- and - postconditions, side effects, etc, represented in xml. - However, binaries may of course be dynamically linked to a wide variety of - other libraries, for which it is not directly feasible to create these - summaries (e.g., because suitable binaries are not available for analysis). - One possibility is for the user to manually create the xml function summaries - for all functions of interest. A more user-friendly means of providing - similar information is through function prototypes decorated with suitable - attributes, as described here. + postconditions, side effects, etc., represented in XML. However, binaries + may be dynamically linked to a wide variety of other libraries for which + it is not feasible to create such summaries. A more user-friendly means of + providing this information is through function prototypes decorated with + suitable attributes, as described here. - We use the same syntax as presented in - (https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html). - Currently the following attributes are supported: + {2 Attribute policy} + Two categories of attributes are accepted on input. Only [chk_pre], + [chk_se], [chk_post], [chk_epost], and [chk_qual] are emitted in + generated output headers; the GCC compatibility attributes are read-only + (see bCHFunctionSemanticsAttributes.ml for the output path). + + {3 GCC compatibility attributes (read-only)} + + These attributes are accepted so that existing annotated system headers + (e.g., glibc) can be consumed without modification. + + {4 access} + + Syntax (GCC standard): {[ - (access (access-mode, ref-index)) - (access (access-mode, ref-index, size-index)) - (nonnull (ref-indices)) + __attribute__ ((access (access-mode, ref-index))) + __attribute__ ((access (access-mode, ref-index, size-index))) ]} - Access modes supported are [read_only], [read_write], and [write_only]; the - [ref-index] is an integer denoting the (1-based) index of the pointer - argument being accessed, and [size-index] is an integer denoting the - (1-based) index of an argument that provides a maximum size (in bytes) - for the memory region accessed. + Access modes: [read_only] -> {!XXBuffer}; [write_only] -> {!XXBlockWrite}; + [read_write] -> both. [ref-index] is the 1-based index of the pointer + argument; [size-index] is the 1-based index of the argument giving the + size in bytes. [write_only] and [read_write] also produce an + {!XXBlockWrite} side effect. - As an example, for [memcpy] this would be decorated as: + {4 nonnull} + Syntax: {[ - __attribute__ ((access (read_only, 2, 3)), - (access (write_only, 1, 3)), (nonnull (1, 2))) - void* memcpy (void *dst, const void *src, size_t len); + __attribute__ ((nonnull)) + __attribute__ ((nonnull (ref-index, ...))) + ]} + + Bare form: all pointer-typed parameters must be non-null -> {!XXNotNull} + for each. Indexed form: listed parameters must be non-null -> {!XXNotNull} + per index. + + {4 format} + + Syntax: + {[ + __attribute__ ((format (archetype, string-index, first-to-check))) + ]} + + [printf] and [gnu_printf] archetypes -> {!XXOutputFormatString} on the + format string parameter. [scanf] and [gnu_scanf] archetypes -> + {!XXInputFormatString} on the format string parameter. Other archetypes + are accepted but produce no precondition. + + {4 noreturn} + + Syntax: + {[ + __attribute__ ((noreturn)) + ]} + + Sets [fq_noreturn = Some true] in {!function_qualifiers_t}. Indicates + that the function does not return to the caller. + + {4 pure} + + Syntax: + {[ + __attribute__ ((pure)) + ]} + + Sets [fq_functional = Some FPure] in {!function_qualifiers_t}. The + function has no side effects but its return value may depend on global + state or memory passed via pointers (e.g., [strlen]). + + {4 const} + + Syntax: + {[ + __attribute__ ((const)) ]} - (Note that the analyzer has a comprehensive function summary for memcpy, so - it is only shown here as an example, because of its familiar semantics.) + Sets [fq_functional = Some FConst] in {!function_qualifiers_t}. The + function reads only its direct arguments and has no side effects + (e.g., [abs], [sqrt]). Strictly stronger than [pure]. + + {4 warn_unused_result} + + Syntax: + {[ + __attribute__ ((warn_unused_result)) + ]} + + Sets [fq_must_use_return = Some true] in {!function_qualifiers_t}. The + caller is obligated to inspect the return value. Equivalent to + [chk_qual(must_use_return)] for headers that use the GCC standard form. + + {3 CodeHawk-specific attributes} + + These are the canonical forms used in hand-written CodeHawk header files + and in generated output headers. All use the [chk_pre] attribute name + with a sub-tag as the first parameter identifying the predicate kind. + + All argument indices are 1-based. Index 0 refers to the return value + (relevant for postconditions via [chk_post]). + + {4 Buffer and memory region predicates} + + {[ + __attribute__ ((chk_pre (deref_read, ref-index))) + __attribute__ ((chk_pre (deref_read, ref-index, size-index))) + __attribute__ ((chk_pre (deref_read (size), ref-index))) + __attribute__ ((chk_pre (deref_read (ntp), ref-index))) + ]} + -> {!XXBuffer}: pointer argument [ref-index] must be readable for at + least the given number of bytes ([size-index] argument, constant [size], + or up to the null terminator [ntp]). + + {[ + __attribute__ ((chk_pre (deref_write, ref-index))) + __attribute__ ((chk_pre (deref_write, ref-index, size-index))) + __attribute__ ((chk_pre (deref_write (size), ref-index))) + ]} + -> {!XXBlockWrite}: pointer argument [ref-index] must be writable for at + least the given number of bytes. + + {[ + __attribute__ ((chk_pre (initialized_range (ntp), ref-index))) + ]} + -> {!XXInitializedRange}: memory starting at [ref-index] is initialized + up to the null terminator. + + {[ + __attribute__ ((chk_pre (no_overlap, ref-index-1, ref-index-2))) + ]} + -> {!XXNoOverlap}: the memory regions pointed to by the two arguments + must not overlap. + + {4 Null and zero predicates} + + {[ + __attribute__ ((chk_pre (not_null, ref-index))) + ]} + -> {!XXNotNull}: argument must not be null. + + {[ + __attribute__ ((chk_pre (null_terminated, ref-index))) + ]} + -> {!XXNullTerminated}: argument points to a null-terminated string. + + {[ + __attribute__ ((chk_pre (not_zero, ref-index))) + ]} + -> {!XXNotZero}: argument must not be zero. + + {[ + __attribute__ ((chk_pre (non_negative, ref-index))) + ]} + -> {!XXNonNegative}: argument must not be negative. + + {4 Relational predicates} + + {[ + __attribute__ ((chk_pre (relational_expr (op), ref-index-1, ref-index-2))) + ]} + -> {!XXRelationalExpr}: the two arguments satisfy the given relation. + Operators: [eq], [lt], [leq], [gt], [geq], [neq]. + + {4 Format string predicates} + + {[ + __attribute__ ((chk_pre (output_format_string, ref-index))) + ]} + -> {!XXOutputFormatString}: argument is a printf-style format string. + + {[ + __attribute__ ((chk_pre (input_format_string, ref-index))) + ]} + -> {!XXInputFormatString}: argument is a scanf-style format string. + + {4 Trusted string and allocation predicates} + + {[ + __attribute__ ((chk_pre (allocation_base, ref-index))) + ]} + -> {!XXAllocationBase}: argument is the base address of a dynamically + allocated region. + + {[ + __attribute__ ((chk_pre (trusted_string, ref-index))) + ]} + -> {!XXTrustedString}: argument is a trusted string value. + + {[ + __attribute__ ((chk_pre (trusted_os_cmd_string, ref-index))) + ]} + -> {!XXTrustedOsCmdString}: argument is safe to pass to [system(3)]. + + {[ + __attribute__ ((chk_pre (trusted_os_cmd_fmt_string (kind, size), ref-index))) + ]} + -> {!XXTrustedOsCmdFmtString}: the string constructed from this format + argument is safe to pass to [system(3)]. + + {3 chk_se: CodeHawk side effects} + + The canonical form for side effects on pointer arguments. The sub-tag + identifies the kind; [ref-index] is the 1-based index of the pointer + parameter. + + {[ + __attribute__ ((chk_se (deref_write, ref-index))) + __attribute__ ((chk_se (deref_write, ref-index, size-index))) + __attribute__ ((chk_se (deref_write (size), ref-index))) + ]} + -> {!XXBlockWrite}: the function writes into the buffer at [ref-index]. + Size is given by [size-index] argument, a constant, or is unknown + ([RunTimeValue]). + + {[ + __attribute__ ((chk_se (deref_write_null, ref-index))) + __attribute__ ((chk_se (deref_write_null, ref-index, size-index))) + ]} + -> {!XXConditional} ({!XXNotNull}, {!XXBlockWrite}): the function writes + into [ref-index] only when it is not null. + + {[ + __attribute__ ((chk_se (freed, ref-index))) + ]} + -> {!XXFreed}: the function frees the pointer at [ref-index]. + + {[ + __attribute__ ((chk_se (modifies, ref-index))) + ]} + -> {!XXModified}: the function modifies the memory at [ref-index] in an + unspecified way. + + {[ + __attribute__ ((chk_se (invalidates, ref-index))) + ]} + -> {!XXInvalidated}: the pointer at [ref-index] becomes invalid after the + call (e.g., after [realloc] the old pointer must not be used). + + {3 chk_post / chk_epost: CodeHawk postconditions} + + These are the canonical forms for postconditions ([chk_post] for the + success case, [chk_epost] for the error case). + + Each attribute takes a predicate name and an optional 1-based argument + index. When no index is given the predicate applies to the return value; + when an index is given the predicate applies to the post-call state of + that parameter. + + {[ + __attribute__ ((chk_post (pred))) (* applies to return value *) + __attribute__ ((chk_post (pred, ref-index))) (* applies to parameter *) + ]} + + {[ + __attribute__ ((chk_post (not_null))) + ]} + -> {!XXNotNull} on the return value (return is not null on success). + + {[ + __attribute__ ((chk_post (null))) + ]} + -> {!XXNull} on the return value (return is null on success). + + {[ + __attribute__ ((chk_post (non_negative))) + ]} + -> {!XXNonNegative} on the return value (return >= 0 on success). + + {[ + __attribute__ ((chk_post (not_zero))) + ]} + -> {!XXNotZero} on the return value (return != 0 on success). + + {[ + __attribute__ ((chk_post (positive))) + ]} + -> {!XXPositive} on the return value (return > 0 on success). + + {[ + __attribute__ ((chk_post (null_terminated))) + ]} + -> {!XXNullTerminated} on the return value (return points to a + null-terminated string on success). + + {[ + __attribute__ ((chk_post (new_memory))) + ]} + -> {!XXNewMemory} on the return value (return is freshly allocated + memory on success). + + {[ + __attribute__ ((chk_post (allocation_base))) + ]} + -> {!XXAllocationBase} on the return value (return is the base of an + allocation on success). + + {[ + __attribute__ ((chk_post (trusted_string))) + ]} + -> {!XXTrustedString} on the return value (return is a trusted string + value). Used in patching: a sanitizing replacement function can declare + its output trusted so that downstream proof obligations on the string + value are discharged. + + {[ + __attribute__ ((chk_post (trusted_os_cmd_string))) + ]} + -> {!XXTrustedOsCmdString} on the return value (return is safe to pass + to [system(3)]). Used in patching: a command-injection sanitizer declares + its output safe, discharging the [XPOTrustedOsCmdString] proof obligation + at the [system] call site. + + {[ + __attribute__ ((chk_post (tainted))) + ]} + -> {!XXTainted} on the return value (return value is externally controlled + and must not be used without validation). + + The following forms are primarily useful as error postconditions with + [chk_epost], but are accepted by both: + + {[ + __attribute__ ((chk_epost (null))) (* return is NULL on error *) + __attribute__ ((chk_epost (negone))) (* return is -1 on error *) + __attribute__ ((chk_epost (zero))) (* return is 0 on error *) + __attribute__ ((chk_epost (negative))) (* return < 0 on error *) + __attribute__ ((chk_epost (nonpositive))) (* return <= 0 on error *) + ]} + + Common paired patterns (each requires two attributes): + {[ + /* notnull-null: success=not null, error=null */ + __attribute__ ((chk_post (not_null), chk_epost (null))) + + /* zero-negone: success=0, error=-1 */ + __attribute__ ((chk_post (zero), chk_epost (negone))) + + /* nonnegative-negative: success>=0, error<0 */ + __attribute__ ((chk_post (non_negative), chk_epost (negative))) + + /* positive-zero: success>0, error=0 */ + __attribute__ ((chk_post (positive), chk_epost (zero))) + ]} + + Parameter postcondition example ([strcpy]-style: destination is + null-terminated after the call): + {[ + __attribute__ ((chk_post (null_terminated, 1))) + char *strcpy (char *dst, const char *src); + ]} + + {3 chk_qual: CodeHawk function qualifiers} + + These are the canonical forms for non-predicate function properties that + have no GCC-standard attribute equivalent. Unlike [chk_pre] (preconditions) + and [chk_se] (side effects), [chk_qual] qualifiers carry no argument + indices — they are properties of the function itself. + + {[ + __attribute__ ((chk_qual (sets_errno))) + ]} + Sets [fq_sets_errno = Some true] in {!function_qualifiers_t}. The function + sets [errno] to indicate the specific error when it fails. This is a + property documented in the C standard and POSIX, distinct from any + observable memory side effect. + + {[ + __attribute__ ((chk_qual (must_use_return))) + ]} + Sets [fq_must_use_return = Some true] in {!function_qualifiers_t}. The + caller is obligated to inspect the return value (e.g., to check for an + error code). Implied by the presence of an error-postcondition in a + function summary; provided here for use in hand-written CodeHawk headers. + + {2 Example} + + For [memcpy]: + {[ + __attribute__ ((access (read_only, 2, 3)), + (access (write_only, 1, 3)), + (nonnull (1, 2))) + void *memcpy (void *dst, const void *src, size_t len); + ]} - A prototype thus decorated will automatically generate a function interface - with the function semantics that include the corresponding preconditions - (and, in case of write_only, the corresponding side effect) for the given - library function, resulting in the appropriate proof obligations at their - call sites. + (The analyzer has a comprehensive built-in summary for [memcpy]; this + is shown only as an illustration of the attribute syntax.) *) val convert_b_attributes_to_function_conditions: function_interface_t -> b_attributes_t - -> (xxpredicate_t list * xxpredicate_t list * xxpredicate_t list) + -> (xxpredicate_t list + * xxpredicate_t list + * xxpredicate_t list + * xxpredicate_t list + * function_qualifiers_t) diff --git a/CodeHawk/CHB/bchlib/bCHCallTargetInfo.ml b/CodeHawk/CHB/bchlib/bCHCallTargetInfo.ml index fda8f2326..efd4a2f13 100644 --- a/CodeHawk/CHB/bchlib/bCHCallTargetInfo.ml +++ b/CodeHawk/CHB/bchlib/bCHCallTargetInfo.ml @@ -192,8 +192,7 @@ object (self) | _ -> None) None self#get_preconditions method is_nonreturning = - List.exists - (fun p -> match p with XXFalse -> true | _ -> false) sem.fsem_post + sem.fsem_qualifiers.fq_noreturn = Some true method has_sideeffects = match self#get_sideeffects with diff --git a/CodeHawk/CHB/bchlib/bCHExternalPredicate.ml b/CodeHawk/CHB/bchlib/bCHExternalPredicate.ml index b89044b9d..1f4820d84 100644 --- a/CodeHawk/CHB/bchlib/bCHExternalPredicate.ml +++ b/CodeHawk/CHB/bchlib/bCHExternalPredicate.ml @@ -99,15 +99,9 @@ let rec xxpredicate_compare (p1: xxpredicate_t) (p2: xxpredicate_t): int = let l0 = btc t1 t2 in if l0 = 0 then Stdlib.compare s1 s2 else l0 | (XXEnum _, _) -> -1 | (_, XXEnum _) -> 1 - | (XXFalse, XXFalse) -> 0 - | (XXFalse, _) -> -1 - | (_, XXFalse) -> 1 | (XXFreed t1, XXFreed t2) -> btc t1 t2 | (XXFreed _, _) -> -1 | (_, XXFreed _) -> 1 - | (XXFunctional, XXFunctional) -> 0 - | (XXFunctional, _) -> -1 - | (_, XXFunctional) -> 1 | (XXFunctionPointer (_, t1), XXFunctionPointer (_, t2)) -> btc t1 t2 | (XXFunctionPointer _, _) -> -1 | (_, XXFunctionPointer _) -> 1 @@ -178,9 +172,6 @@ let rec xxpredicate_compare (p1: xxpredicate_t) (p2: xxpredicate_t): int = l0 | (XXRelationalExpr _, _) -> -1 | (_, XXRelationalExpr _) -> 1 - | (XXSetsErrno, XXSetsErrno) -> 0 - | (XXSetsErrno, _) -> -1 - | (_, XXSetsErrno) -> 1 | (XXStartsThread (t1, tl1), XXStartsThread (t2, tl2)) -> let l0 = btc t1 t2 in if l0 = 0 then list_compare tl1 tl2 btc else l0 | (XXStartsThread _, _) -> -1 @@ -232,9 +223,7 @@ let rec xxpredicate_terms (p: xxpredicate_t): bterm_t list = | XXBlockWrite (_, t1, t2) -> [t1; t2] | XXBuffer (_, t1, t2) -> [t1; t2] | XXEnum (t, _, _) -> [t] - | XXFalse -> [] | XXFreed t -> [t] - | XXFunctional -> [] | XXFunctionPointer (_, t) -> [t] | XXIncludes (t, _) -> [t] | XXInitialized t -> [t] @@ -255,7 +244,6 @@ let rec xxpredicate_terms (p: xxpredicate_t): bterm_t list = | XXOutputFormatString t -> [t] | XXPositive t -> [t] | XXRelationalExpr (_, t1, t2) -> [t1; t2] - | XXSetsErrno -> [] | XXStartsThread (t, tt) -> t :: tt | XXTainted t -> [t] | XXTrustedString t -> [t] @@ -370,9 +358,7 @@ let rec xxpredicate_to_pretty (p: xxpredicate_t) = | XXEnum (t, s, b) -> LBLOCK [ btp t; STR ": member of "; STR s; (if b then STR " (flags)" else STR "")] - | XXFalse -> STR "false" | XXFreed t -> default "freed" [t] - | XXFunctional -> STR "functional" | XXFunctionPointer (ty, t) -> LBLOCK [ STR "function-pointer("; @@ -409,7 +395,6 @@ let rec xxpredicate_to_pretty (p: xxpredicate_t) = | XXPositive t -> default "positive" [t] | XXRelationalExpr (op, t1, t2) -> LBLOCK [btp t1; STR (relational_op_to_string op); btp t2] - | XXSetsErrno -> STR "sets errno" | XXStartsThread (t, tt) -> default "starts-thread" (t :: tt) | XXTainted t -> default "tainted" [t] | XXTrustedString t -> default "trusted-string" [t] @@ -460,9 +445,7 @@ let rec modify_types_xxp | XXBlockWrite (ty, t1, t2) -> XXBlockWrite (mt ty, mbt t1, mbt t2) | XXBuffer (ty, t1, t2) -> XXBuffer (mt ty, mbt t1, mbt t2) | XXEnum (t, s, b) -> XXEnum (mbt t, s, b) - | XXFalse -> XXFalse | XXFreed t -> XXFreed (mbt t) - | XXFunctional -> XXFunctional | XXFunctionPointer (ty, t) -> XXFunctionPointer (mt ty, mbt t) | XXIncludes (t, c) -> XXIncludes (mbt t, c) | XXInitialized t -> XXInitialized (mbt t) @@ -483,7 +466,6 @@ let rec modify_types_xxp | XXNullTerminated t -> XXNullTerminated (mbt t) | XXOutputFormatString t -> XXOutputFormatString (mbt t) | XXRelationalExpr (op, t1, t2) -> XXRelationalExpr (op, mbt t1, mbt t2) - | XXSetsErrno -> XXSetsErrno | XXStartsThread (t, tt) -> XXStartsThread (mbt t, List.map mbt tt) | XXTainted t -> XXTainted (mbt t) | XXTrustedString t -> XXTrustedString (mbt t) diff --git a/CodeHawk/CHB/bchlib/bCHFloc.ml b/CodeHawk/CHB/bchlib/bCHFloc.ml index 72b9eb4f9..c51944dcd 100644 --- a/CodeHawk/CHB/bchlib/bCHFloc.ml +++ b/CodeHawk/CHB/bchlib/bCHFloc.ml @@ -3723,18 +3723,6 @@ object (self) | XXNull term -> get_null_commands term | XXNotNull term -> get_not_null_commands term | XXRelationalExpr (op, t1, t2) -> get_post_expr_commands op t1 t2 - | XXFalse -> - let ctinfo = self#get_call_target in - if ctinfo#is_nonreturning then - [] (* was known during translation, or has been established earlier *) - else - begin - (* ctinfo#set_nonreturning; *) - chlog#add - "function retracing" - (LBLOCK [self#l#toPretty; STR ": "; STR name]); - raise Request_function_retracing - end | _ -> let msg = xxpredicate_to_pretty post in begin @@ -3747,6 +3735,20 @@ object (self) (returnvar:variable_t) (string_retriever:doubleword_int -> string option) = let name = summary#get_name in + if summary#is_nonreturning then + begin + let ctinfo = self#get_call_target in + if ctinfo#is_nonreturning then + [] (* was known during translation, or has been established earlier *) + else + begin + chlog#add + "function retracing" + (LBLOCK [self#l#toPretty; STR ": "; STR name]); + raise Request_function_retracing + end + end + else let postCommands = List.concat (List.map (fun post -> self#assert_post name post returnvar string_retriever) diff --git a/CodeHawk/CHB/bchlib/bCHFunctionInterface.ml b/CodeHawk/CHB/bchlib/bCHFunctionInterface.ml index 68c1697c9..051c26fab 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionInterface.ml +++ b/CodeHawk/CHB/bchlib/bCHFunctionInterface.ml @@ -1344,15 +1344,16 @@ let function_interface_to_bfuntype (fintf: function_interface_t): btype_t = let par_funarg (_, name, ty) = (name, ty, []) in let funargs = Some ((List.map par_funarg regPars) @ (List.map par_funarg stackPars)) in - TFun (fts.fts_returntype, funargs, false, []) + TFun (fts.fts_returntype, funargs, fts.fts_varargs, []) let function_type_resolvents_to_bfuntype (name: string) (resolvents: (register_t * btype_t option * b_attributes_t) list - * btype_t option): btype_t = - let fintf = default_function_interface name in - let (regtypes, returntype) = resolvents in + * btype_t option + * bool): btype_t = + let (regtypes, returntype, varargs) = resolvents in + let fintf = default_function_interface ~varargs name in let fintf = List.fold_left (fun fintf (reg, optty, _) -> match optty with diff --git a/CodeHawk/CHB/bchlib/bCHFunctionInterface.mli b/CodeHawk/CHB/bchlib/bCHFunctionInterface.mli index 21db33905..2bf4ee18d 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionInterface.mli +++ b/CodeHawk/CHB/bchlib/bCHFunctionInterface.mli @@ -117,7 +117,9 @@ val bvarinfo_to_function_interface: bvarinfo_t -> function_interface_t val function_type_resolvents_to_bfuntype: string - -> ((register_t * btype_t option * b_attributes_t) list * btype_t option) + -> ((register_t * btype_t option * b_attributes_t) list + * btype_t option + * bool) -> btype_t diff --git a/CodeHawk/CHB/bchlib/bCHFunctionPODischarge.ml b/CodeHawk/CHB/bchlib/bCHFunctionPODischarge.ml index 16e4d1b06..0bfeffddc 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionPODischarge.ml +++ b/CodeHawk/CHB/bchlib/bCHFunctionPODischarge.ml @@ -332,12 +332,29 @@ let trusted_os_cmd_fmt_string_va_list_delegate | _ -> Open +let trusted_os_cmd_fmt_string_fmt_args_delegate + (finfo: function_info_int) + (loc: location_int) + (fmtargs: annotated_format_arg_t list): po_status_t = + let strargs = + List.filter (fun (conv, _, _) -> + match conv with + | CHFormatStringParser.StringConverter -> true + | _ -> false) fmtargs in + List.fold_left (fun _acc (_, _, argxpr) -> + let new_xpo = XPOTrustedOsCmdFmtArgString (argxpr, NO_QUOTES, None) in + finfo#proofobligations#add_proofobligation loc#ci new_xpo Open; + DelegatedLocal (loc#ci, new_xpo) + ) Open strargs + + let discharge_trusted_os_cmd_fmt_string (finfo: function_info_int) (loc: location_int) (x: xpr_t) (kind: format_args_kind_t) - (optlen: xpr_t option): po_status_t = + (optlen: xpr_t option) + (fmtargs: annotated_format_arg_t list): po_status_t = let status = trusted_os_cmd_fmt_string_no_string_conversions loc x in let status = match status with @@ -345,8 +362,8 @@ let discharge_trusted_os_cmd_fmt_string (match kind with | VA_LIST -> trusted_os_cmd_fmt_string_va_list_delegate finfo loc x optlen - | FMT_ARGS -> status) - (* trusted_os_cmd_fmt_string_fmt_args_delegate_local finfo loc x optlen) *) + | FMT_ARGS -> + trusted_os_cmd_fmt_string_fmt_args_delegate finfo loc fmtargs) | _ -> status in match status with | Open -> @@ -362,6 +379,82 @@ let discharge_trusted_os_cmd_fmt_string status +(* ------------------------------------------------------------------------- + XPOTrustedOsCmdFmtArgString + ------------------------------------------------------------------------- *) + +let trusted_os_cmd_fmt_arg_string_constant_string_stmt + (loc: location_int) (x: xpr_t) (_quotes: quote_status_t): po_status_t = + match get_constant_string loc x with + | Some s -> Discharged ("constant string: " ^ s) + | _ -> Open + + +(** Discharge by matching a [XXTrustedOsCmdString] or [XXTrustedString] + postcondition on the call that produced [x] as its return value. *) +let trusted_os_cmd_fmt_arg_string_return_value_postcondition + (finfo: function_info_int) + (_loc: location_int) + (x: xpr_t) + (_quotes: quote_status_t) + (_optlen: int option): po_status_t = + match x with + | XVar v when finfo#env#is_return_value v -> + TR.tfold + ~ok:(fun callsite -> + let ctinfo = finfo#get_call_target callsite in + let is_trusted post = + match post with + | XXTrustedOsCmdString (ReturnValue _) -> true + | XXTrustedString (ReturnValue _) -> true + | _ -> false in + let is_violated post = + match post with + | XXTainted (ReturnValue _) -> true + | _ -> false in + if List.exists is_trusted ctinfo#get_postconditions then + Discharged ("return value of " ^ ctinfo#get_name ^ " is trusted") + else if List.exists is_violated ctinfo#get_postconditions then + Violated ("return value of " ^ ctinfo#get_name ^ " is potentially tainted") + else + Open) + ~error:(fun _ -> Open) + (finfo#env#get_call_site v) + | _ -> Open + + +let trusted_os_cmd_fmt_arg_string_delegate_local + (_finfo: function_info_int) + (_loc: location_int) + (_x: xpr_t) + (_quotes: quote_status_t) + (_optlen: int option): po_status_t = + Open + + +let discharge_trusted_os_cmd_fmt_arg_string + (finfo: function_info_int) + (loc: location_int) + (x: xpr_t) + (quotes: quote_status_t) + (optlen: int option): po_status_t = + let status = + trusted_os_cmd_fmt_arg_string_constant_string_stmt loc x quotes in + let status = + match status with + | Open -> + trusted_os_cmd_fmt_arg_string_return_value_postcondition + finfo loc x quotes optlen + | _ -> status in + let status = + match status with + | Open -> + trusted_os_cmd_fmt_arg_string_delegate_local + finfo loc x quotes optlen + | _ -> status in + status + + (* ------------------------------------------------------------------------- XPOOutputFormatString ------------------------------------------------------------------------- *) @@ -961,8 +1054,11 @@ let discharge_one | XPOTrustedOsCmdString x -> discharge_trusted_os_cmd_string finfo po#loc x - | XPOTrustedOsCmdFmtString (x, kind, optlen, _) -> - discharge_trusted_os_cmd_fmt_string finfo po#loc x kind optlen + | XPOTrustedOsCmdFmtString (x, kind, optlen, fmtargs) -> + discharge_trusted_os_cmd_fmt_string finfo po#loc x kind optlen fmtargs + + | XPOTrustedOsCmdFmtArgString (x, quotes, optlen) -> + discharge_trusted_os_cmd_fmt_arg_string finfo po#loc x quotes optlen | XPOOutputFormatString x -> discharge_output_format_string finfo po#loc x diff --git a/CodeHawk/CHB/bchlib/bCHFunctionSemantics.ml b/CodeHawk/CHB/bchlib/bCHFunctionSemantics.ml index a3ac8ddf2..132d0753d 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionSemantics.ml +++ b/CodeHawk/CHB/bchlib/bCHFunctionSemantics.ml @@ -195,7 +195,18 @@ let read_xml_function_semantics else []; fsem_desc = (if has "desc" then get "desc" else ""); - fsem_io_actions = io_actions + fsem_io_actions = io_actions; + fsem_qualifiers = + { fq_noreturn = + if has "noreturn" then Some true else None; + fq_functional = + if has "const" then Some FConst + else if has "pure" then Some FPure + else None; + fq_sets_errno = + if has "sets-errno" then Some true else None; + fq_must_use_return = + if has "must-use-return" then Some true else None } } @@ -240,7 +251,17 @@ let write_xml_function_semantics (if (List.length pre) > 0 then setlist "pre" pre); (if (List.length post) > 0 then setlist "post" post); (if (List.length epost) > 0 then setlist "epost" epost); - (if (List.length sidee) > 0 then setlist "sidee" sidee) + (if (List.length sidee) > 0 then setlist "sidee" sidee); + (match sem.fsem_qualifiers.fq_functional with + | Some FConst -> node#setAttribute "const" "yes" + | Some FPure -> node#setAttribute "pure" "yes" + | None -> ()); + (if sem.fsem_qualifiers.fq_noreturn = Some true then + node#setAttribute "noreturn" "yes"); + (if sem.fsem_qualifiers.fq_sets_errno = Some true then + node#setAttribute "sets-errno" "yes"); + (if sem.fsem_qualifiers.fq_must_use_return = Some true then + node#setAttribute "must-use-return" "yes") end @@ -300,11 +321,32 @@ let join_semantics fsem_postrequests = sem.fsem_postrequests @ s.fsem_postrequests; fsem_io_actions = sem.fsem_io_actions @ s.fsem_io_actions; fsem_throws = sem.fsem_throws @ s.fsem_throws; - fsem_desc = sem.fsem_desc ^ "; " ^ s.fsem_desc + fsem_desc = sem.fsem_desc ^ "; " ^ s.fsem_desc; + fsem_qualifiers = + let q1 = sem.fsem_qualifiers and q2 = s.fsem_qualifiers in + let join_bool a b = match (a, b) with + | (Some x, Some y) when x = y -> Some x + | _ -> None in + { fq_noreturn = join_bool q1.fq_noreturn q2.fq_noreturn; + fq_functional = + (match (q1.fq_functional, q2.fq_functional) with + | (Some FConst, Some FConst) -> Some FConst + | (Some _, Some _) -> Some FPure + | _ -> None); + fq_sets_errno = join_bool q1.fq_sets_errno q2.fq_sets_errno; + fq_must_use_return = join_bool q1.fq_must_use_return q2.fq_must_use_return } } | _ -> sem +let default_function_qualifiers = { + fq_noreturn = None; + fq_functional = None; + fq_sets_errno = None; + fq_must_use_return = None + } + + let default_function_semantics = { fsem_pre = []; fsem_post = []; @@ -313,14 +355,15 @@ let default_function_semantics = { fsem_postrequests = []; fsem_io_actions = []; fsem_throws = []; - fsem_desc = "" + fsem_desc = ""; + fsem_qualifiers = default_function_qualifiers } let bvarinfo_to_function_semantics (vinfo: bvarinfo_t) (fintf: function_interface_t): function_semantics_t = if (List.length vinfo.bvattr) > 0 then - let (preconditions, sideeffects, _) = + let (preconditions, sideeffects, postconditions, errorpostconditions, qualifiers) = convert_b_attributes_to_function_conditions fintf vinfo.bvattr in let _ = log_diagnostics_result @@ -329,10 +372,16 @@ let bvarinfo_to_function_semantics __FILE__ __LINE__ ["pre: " ^ (string_of_int (List.length preconditions)); "side: " ^ (string_of_int (List.length sideeffects)); + "post: " ^ (string_of_int (List.length postconditions)); + "epost: " ^ (string_of_int (List.length errorpostconditions)); "attrs: " ^ (attributes_to_string vinfo.bvattr)] in let fsem = {default_function_semantics with - fsem_pre = preconditions; fsem_sideeffects = sideeffects} in + fsem_pre = preconditions; + fsem_sideeffects = sideeffects; + fsem_post = postconditions; + fsem_errorpost = errorpostconditions; + fsem_qualifiers = qualifiers} in let _ = log_diagnostics_result ~tag:"bvarinfo_to_function_semantics" @@ -383,6 +432,20 @@ let get_type_arg_mode | _ -> None) None predicates else mode in + let mode = + if Option.is_none mode then + List.fold_left (fun acc p -> + match acc with + | Some _ -> acc + | _ -> + match p with + | XXInputFormatString (ArgValue param) + when Option.is_some param.apar_index + && (Option.get param.apar_index) = argindex -> + Some ArgInputFormatString + | _ -> None) None predicates + else + mode in let mode = if Option.is_none mode then List.fold_left (fun acc p -> diff --git a/CodeHawk/CHB/bchlib/bCHFunctionSemantics.mli b/CodeHawk/CHB/bchlib/bCHFunctionSemantics.mli index e9c6ab73e..947390228 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionSemantics.mli +++ b/CodeHawk/CHB/bchlib/bCHFunctionSemantics.mli @@ -40,6 +40,8 @@ open BCHLibTypes (** {1 Creation}*) +val default_function_qualifiers: function_qualifiers_t + val default_function_semantics: function_semantics_t val join_semantics: diff --git a/CodeHawk/CHB/bchlib/bCHFunctionSemanticsAttributes.ml b/CodeHawk/CHB/bchlib/bCHFunctionSemanticsAttributes.ml index 1072a4982..fa876339f 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionSemanticsAttributes.ml +++ b/CodeHawk/CHB/bchlib/bCHFunctionSemanticsAttributes.ml @@ -25,6 +25,23 @@ SOFTWARE. ============================================================================= *) +(* Output path: function semantics → attributes (for delegated preconditions, + side effects, postconditions, error-postconditions, and qualifiers in + generated header files). + + Emitted forms: + - chk_pre : delegated proof obligations (preconditions) + - chk_se : side effects (block-write, freed, modifies, invalidates) + - chk_post : postconditions on the return value or a parameter + - chk_epost: error-path postconditions + - chk_qual : CodeHawk-specific qualifiers (sets_errno) + - noreturn, pure, const, warn_unused_result: standard GCC qualifiers + + GCC compatibility forms (access, nonnull, format) are accepted on input + but never generated here. + + See bCHAttributesFunctionSemantics.ml for the input path. *) + (* chutil *) open CHLogger open CHTraceResult @@ -37,6 +54,7 @@ open BCHLibTypes module TR = CHTraceResult +let (let*) x f = CHTraceResult.tbind f x let p2s = CHPrettyUtil.pretty_to_string @@ -265,8 +283,257 @@ let convert_preconditions_to_attributes | _ -> acc) [] preconditions +let convert_xxpredicate_to_post_attrparams + (ctx: string) + (xpred: xxpredicate_t): b_attrparam_t list option = + let target_params target = + match target with + | ReturnValue _ -> Some [] + | ArgValue par -> + (match par.apar_index with + | Some index -> Some [AInt index] + | None -> + begin + log_diagnostics_result + ~tag:"convert_xxpredicate_to_post_attrparams:no index" + ~msg:ctx + __FILE__ __LINE__ + ["par: " ^ (bterm_to_string (ArgValue par))]; + None + end) + | _ -> + begin + log_diagnostics_result + ~tag:"convert_xxpredicate_to_post_attrparams:unexpected target" + ~msg:ctx + __FILE__ __LINE__ + ["target: " ^ (bterm_to_string target)]; + None + end in + let make pred target = + match target_params target with + | None -> None + | Some argparams -> Some (ACons (pred, []) :: argparams) in + let zero = CHNumerical.numerical_zero in + let negone = CHNumerical.mkNumerical (-1) in + match xpred with + | XXNotNull target -> make "not_null" target + | XXNull target -> make "null" target + | XXNonNegative target -> make "non_negative" target + | XXNotZero target -> make "not_zero" target + | XXPositive target -> make "positive" target + | XXNullTerminated target -> make "null_terminated" target + | XXNewMemory (target, RunTimeValue) -> make "new_memory" target + | XXAllocationBase target -> make "allocation_base" target + | XXTrustedString target -> make "trusted_string" target + | XXTrustedOsCmdString target -> make "trusted_os_cmd_string" target + | XXTainted target -> make "tainted" target + | XXRelationalExpr (PEquals, target, NumConstant n) when n#equal negone -> + make "negone" target + | XXRelationalExpr (PEquals, target, NumConstant n) when n#equal zero -> + make "zero" target + | XXRelationalExpr (PLessThan, target, NumConstant n) when n#equal zero -> + make "negative" target + | XXRelationalExpr (PLessEqual, target, NumConstant n) when n#equal zero -> + make "nonpositive" target + | _ -> + begin + log_diagnostics_result + ~tag:"convert_xxpredicate_to_post_attrparams:not representable" + ~msg:ctx + __FILE__ __LINE__ + ["pred: " ^ (p2s (BCHExternalPredicate.xxpredicate_to_pretty xpred))]; + None + end + + +let convert_postconditions_to_attributes + (ctx: string) + (attrname: string) + (postconditions: xxpredicate_t list): b_attributes_t = + List.filter_map (fun xpred -> + match convert_xxpredicate_to_post_attrparams ctx xpred with + | None -> None + | Some params -> Some (Attr (attrname, params))) postconditions + + +let convert_sideeffect_to_attribute + (ctx: string) + (xpred: xxpredicate_t): b_attribute_t option = + let par_index par = + match par.apar_index with + | Some index -> Ok index + | None -> + Error [(elocm __LINE__) + ^ "parameter has no index: " + ^ par.apar_name] in + match xpred with + | XXBlockWrite (_, ArgValue par, RunTimeValue) -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", [ACons ("deref_write", []); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:deref_write" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXBlockWrite (_, ArgValue par, ArgValue sizepar) -> + TR.tfold + ~ok:(fun (index, sizeindex) -> + Some (Attr ("chk_se", + [ACons ("deref_write", []); AInt index; AInt sizeindex]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:deref_write(sized)" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (let* i = par_index par in + let* s = par_index sizepar in + Ok (i, s)) + + | XXBlockWrite (_, ArgValue par, NumConstant n) -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", + [ACons ("deref_write", [AInt n#toInt]); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:deref_write(const)" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXFreed (ArgValue par) -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", [ACons ("freed", []); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:freed" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXModified (ArgValue par) -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", [ACons ("modifies", []); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:modifies" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXInvalidated (ArgValue par) -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", [ACons ("invalidates", []); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:invalidates" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXConditional (XXNotNull (ArgValue par), + XXBlockWrite (_, ArgValue par', RunTimeValue)) + when is_same_bterm_par (ArgValue par) (ArgValue par') -> + TR.tfold + ~ok:(fun index -> + Some (Attr ("chk_se", [ACons ("deref_write_null", []); AInt index]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:deref_write_null" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (par_index par) + + | XXConditional (XXNotNull (ArgValue par), + XXBlockWrite (_, ArgValue par', ArgValue sizepar)) + when is_same_bterm_par (ArgValue par) (ArgValue par') -> + TR.tfold + ~ok:(fun (index, sizeindex) -> + Some (Attr ("chk_se", + [ACons ("deref_write_null", []); AInt index; AInt sizeindex]))) + ~error:(fun e -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:deref_write_null(sized)" + ~msg:ctx __FILE__ __LINE__ e; + None + end) + (let* i = par_index par in + let* s = par_index sizepar in + Ok (i, s)) + + | _ -> + begin + log_diagnostics_result + ~tag:"convert_sideeffect_to_attribute:not representable" + ~msg:ctx + __FILE__ __LINE__ + ["pred: " ^ (p2s (BCHExternalPredicate.xxpredicate_to_pretty xpred))]; + None + end + + +let convert_sideeffects_to_attributes + (ctx: string) + (sideeffects: xxpredicate_t list): b_attributes_t = + List.filter_map (convert_sideeffect_to_attribute ctx) sideeffects + + +let convert_qualifiers_to_attributes + (qualifiers: function_qualifiers_t): b_attributes_t = + let attrs = [] in + let attrs = + match qualifiers.fq_noreturn with + | Some true -> Attr ("noreturn", []) :: attrs + | _ -> attrs in + let attrs = + match qualifiers.fq_functional with + | Some FPure -> Attr ("pure", []) :: attrs + | Some FConst -> Attr ("const", []) :: attrs + | _ -> attrs in + let attrs = + match qualifiers.fq_sets_errno with + | Some true -> + Attr ("chk_qual", [ACons ("sets_errno", [])]) :: attrs + | _ -> attrs in + let attrs = + match qualifiers.fq_must_use_return with + | Some true -> Attr ("warn_unused_result", []) :: attrs + | _ -> attrs in + attrs + + let convert_semantics_to_attributes (finfo: function_info_int): b_attributes_t = + let ctx = finfo#get_name in let delegatedpos = finfo#proofobligations#delegated_proofobligations in + let sem = finfo#get_summary#get_function_semantics in let preattrs = convert_preconditions_to_attributes finfo delegatedpos in - preattrs - + let seattrs = convert_sideeffects_to_attributes ctx sem.fsem_sideeffects in + let postattrs = + convert_postconditions_to_attributes ctx "chk_post" sem.fsem_post in + let epostattrs = + convert_postconditions_to_attributes ctx "chk_epost" sem.fsem_errorpost in + let qualattrs = convert_qualifiers_to_attributes sem.fsem_qualifiers in + preattrs @ seattrs @ postattrs @ epostattrs @ qualattrs + diff --git a/CodeHawk/CHB/bchlib/bCHFunctionSummary.ml b/CodeHawk/CHB/bchlib/bCHFunctionSummary.ml index c732b9d02..5692bb51b 100644 --- a/CodeHawk/CHB/bchlib/bCHFunctionSummary.ml +++ b/CodeHawk/CHB/bchlib/bCHFunctionSummary.ml @@ -269,13 +269,10 @@ object (self:'a) sem.fsem_sideeffects method sets_errno = - List.exists (fun p -> match p with XXSetsErrno -> true | _ -> false) - sem.fsem_sideeffects + sem.fsem_qualifiers.fq_sets_errno = Some true method is_nonreturning = - List.exists - (fun p -> match p with XXFalse -> true | _ -> false) - sem.fsem_post + sem.fsem_qualifiers.fq_noreturn = Some true method is_jni_function = match finterface.fintf_jni_index with Some _ -> true | _ -> false diff --git a/CodeHawk/CHB/bchlib/bCHInterfaceDictionary.ml b/CodeHawk/CHB/bchlib/bCHInterfaceDictionary.ml index 95b85b6db..7e4e40fc0 100644 --- a/CodeHawk/CHB/bchlib/bCHInterfaceDictionary.ml +++ b/CodeHawk/CHB/bchlib/bCHInterfaceDictionary.ml @@ -88,6 +88,7 @@ object (self) val fts_parameter_value_table = mk_index_table "parameter-value-table" val function_signature_table = mk_index_table "function-signature-table" val function_interface_table = mk_index_table "function-interface-table" + val function_qualifiers_table = mk_index_table "function-qualifiers-table" val function_semantics_table = mk_index_table "function-semantics-table" val xxpredicate_table = mk_index_table "xxpredicate-table" val xxpredicate_list_table = mk_index_table "xxpredicate-list-table" @@ -117,6 +118,7 @@ object (self) fts_parameter_value_table; function_signature_table; function_interface_table; + function_qualifiers_table; function_semantics_table; xxpredicate_table; xxpredicate_list_table; @@ -459,6 +461,28 @@ object (self) fintf_bctype = if (a 6) = (-1) then None else Some (bcd#get_typ (a 6)) } + method index_function_qualifiers (fq: function_qualifiers_t) = + let ibo = function Some true -> 2 | Some false -> 1 | None -> -1 in + let ifunc = function Some FConst -> 2 | Some FPure -> 1 | None -> -1 in + let args = [ + ibo fq.fq_noreturn; + ifunc fq.fq_functional; + ibo fq.fq_sets_errno; + ibo fq.fq_must_use_return + ] in + function_qualifiers_table#add ([], args) + + method get_function_qualifiers (index: int): function_qualifiers_t = + let name = "function-qualifiers" in + let (_, args) = function_qualifiers_table#retrieve index in + let a = a name args in + let gbo = function 2 -> Some true | 1 -> Some false | _ -> None in + let gfunc = function 2 -> Some FConst | 1 -> Some FPure | _ -> None in + { fq_noreturn = gbo (a 0); + fq_functional = gfunc (a 1); + fq_sets_errno = gbo (a 2); + fq_must_use_return = gbo (a 3) } + method index_function_semantics (fsem: function_semantics_t) = let tags = [] in let args = [ @@ -466,7 +490,8 @@ object (self) self#index_xxpredicate_list fsem.fsem_post; self#index_xxpredicate_list fsem.fsem_errorpost; self#index_xxpredicate_list fsem.fsem_sideeffects; - self#index_xxpredicate_list fsem.fsem_postrequests + self#index_xxpredicate_list fsem.fsem_postrequests; + self#index_function_qualifiers fsem.fsem_qualifiers ] in function_semantics_table#add (tags, args) @@ -481,7 +506,8 @@ object (self) fsem_postrequests = self#get_xxpredicate_list (a 4); fsem_io_actions = []; fsem_desc = "id"; - fsem_throws = [] + fsem_throws = []; + fsem_qualifiers = self#get_function_qualifiers (a 5) } method index_xxpredicate (p: xxpredicate_t) = @@ -496,9 +522,7 @@ object (self) | XXBlockWrite (ty, t1, t2) -> (tags, [ity ty; it t1; it t2]) | XXBuffer (ty, t1, t2) -> (tags, [ity ty; it t1; it t2]) | XXEnum (t, s, b) -> (tags, [it t; bd#index_string s; ib b]) - | XXFalse -> (tags, []) | XXFreed t -> (tags, [it t]) - | XXFunctional -> (tags, []) | XXFunctionPointer (ty, t) -> (tags, [ity ty; it t]) | XXIncludes (t, c) -> (tags, [it t; self#index_c_struct_constant c]) | XXInitialized t -> (tags, [it t]) @@ -520,7 +544,6 @@ object (self) | XXPositive t -> (tags, [it t]) | XXRelationalExpr (op, t1, t2) -> (tags @ [relational_op_mfts#ts op], [it t1; it t2]) - | XXSetsErrno -> (tags, []) | XXStartsThread (t, tl) -> (tags, List.map it (t::tl)) | XXTainted t -> (tags, [it t]) | XXTrustedString t -> (tags, [it t]) @@ -560,9 +583,7 @@ object (self) | "bw" -> XXBlockWrite (gty (a 0), gt (a 1), gt (a 2)) | "b" -> XXBuffer (gty (a 0), gt (a 1), gt (a 2)) | "e" -> XXEnum (gt (a 0), bd#get_string (a 1), (a 2) = 1) - | "f" -> XXFalse | "fr" -> XXFreed (gt (a 0)) - | "fn" -> XXFunctional | "fp" -> XXFunctionPointer (gty (a 0), gt (a 1)) | "inc" -> XXIncludes (gt (a 0), self#get_c_struct_constant (a 1)) | "i" -> XXInitialized (gt (a 0)) @@ -583,7 +604,6 @@ object (self) | "ofs" -> XXOutputFormatString (gt (a 0)) | "pos" -> XXPositive (gt (a 0)) | "x" -> XXRelationalExpr (relational_op_mfts#fs (t 1), gt (a 0), gt (a 1)) - | "errno" -> XXSetsErrno | "st" -> XXStartsThread (gt (a 0), List.map gt (List.tl args)) | "t" -> XXTainted (gt (a 0)) | "tc" -> XXTrustedOsCmdString (gt (a 0)) diff --git a/CodeHawk/CHB/bchlib/bCHLibTypes.mli b/CodeHawk/CHB/bchlib/bCHLibTypes.mli index 5ad87998c..1320314ca 100644 --- a/CodeHawk/CHB/bchlib/bCHLibTypes.mli +++ b/CodeHawk/CHB/bchlib/bCHLibTypes.mli @@ -2383,10 +2383,7 @@ type xxpredicate_t = | XXEnum of bterm_t * string * bool (** term t is one of the values included in the named enumeration, if [flags] is true, the constant is a set of flags *) - | XXFalse - (** always false, used as a post condition to indicate non-returning*) | XXFreed of bterm_t (** term pointed to is freed *) - | XXFunctional (** function has no observable side effects *) | XXFunctionPointer of btype_t * bterm_t (** term is pointer to a function *) | XXIncludes of bterm_t * c_struct_constant_t | XXInitialized of bterm_t (** lval denoted is initialized *) @@ -2417,7 +2414,6 @@ type xxpredicate_t = | XXRelationalExpr of relational_op_t * bterm_t * bterm_t (** relational expression *) - | XXSetsErrno | XXStartsThread of bterm_t * bterm_t list (** starts a thread with [t1] as start address and the remaining terms as parameters *) @@ -2461,6 +2457,34 @@ type io_action_t = { (** {2 Function semantics} *) +(** Purity level of a function: [FPure] means no observable side effects but + may read global or pointed-to memory (GCC [pure]); [FConst] means no side + effects and reads only direct arguments (GCC [const], strictly stronger). *) +type function_purity_t = FPure | FConst + + +(** Non-predicate qualifiers of a function: boolean or simple-enum properties + that describe function-level behavior and calling protocol, but are not + predicates over argument or return values. + + All fields use [bool option] or an enum option to allow a three-valued + interpretation: [Some v] means the property is positively documented, + [None] means unknown. + + - [fq_noreturn]: function never returns (GCC [noreturn], C23 [_Noreturn]). + - [fq_functional]: purity level — [FPure] or [FConst] (GCC [pure]/[const]). + - [fq_sets_errno]: documented to set [errno] on the error path. + - [fq_must_use_return]: caller must inspect the return value before + continuing (implied by any error postcondition; corresponds to GCC + [warn_unused_result] when consumed from third-party headers). *) +type function_qualifiers_t = { + fq_noreturn: bool option; + fq_functional: function_purity_t option; + fq_sets_errno: bool option; + fq_must_use_return: bool option +} + + (** Function semantics, combining pre- and postconditions and side effects.*) type function_semantics_t = { fsem_pre: xxpredicate_t list; @@ -2470,7 +2494,8 @@ type function_semantics_t = { fsem_sideeffects: xxpredicate_t list; fsem_io_actions: io_action_t list; fsem_desc: string; - fsem_throws: string list + fsem_throws: string list; + fsem_qualifiers: function_qualifiers_t } @@ -2605,9 +2630,7 @@ type xpo_predicate_t = | XPOBlockWrite of btype_t * xpr_t * xpr_t | XPOBuffer of btype_t * xpr_t * xpr_t | XPOEnum of xpr_t * string * bool - | XPOFalse | XPOFreed of xpr_t - | XPOFunctional | XPOFunctionPointer of btype_t * xpr_t | XPOIncludes of xpr_t * c_struct_constant_t | XPOInitialized of xpr_t @@ -2628,7 +2651,6 @@ type xpo_predicate_t = | XPONullTerminated of xpr_t | XPOOutputFormatString of xpr_t | XPORelationalExpr of relational_op_t * xpr_t * xpr_t - | XPOSetsErrno | XPOStartsThread of xpr_t * xpr_t list | XPOTainted of xpr_t | XPOTrustedString of xpr_t @@ -2867,6 +2889,11 @@ class type interface_dictionary_int = method read_xml_function_interface: ?tag:string -> xml_element_int -> function_interface_t + (** {1 Function qualifiers}*) + + method index_function_qualifiers: function_qualifiers_t -> int + method get_function_qualifiers: int -> function_qualifiers_t + (** {1 Function semantics}*) method index_function_semantics: function_semantics_t -> int @@ -3287,6 +3314,7 @@ type type_arg_mode_t = | ArgFunctionPointer | ArgScalarValue | ArgOutputFormatString + | ArgInputFormatString type type_operation_kind_t = @@ -3307,6 +3335,11 @@ type type_cap_label_t = | FlowsToOperation of type_operation_kind_t * bterm_t option | FlowsFrom of bterm_t option + | FOutputFormatString + (** parameter is a printf-style format string; implies the function is variadic *) + | FInputFormatString + (** parameter is a scanf-style format string; implies the function is variadic *) + | FReturn (** for now limited to the default return register *) | Load | Store @@ -3465,6 +3498,9 @@ class type type_constraint_store_int = string -> (register_t * btype_t option * b_attributes_t) list * btype_t option + * bool + (** The bool is [true] if any parameter was identified as a + format-string parameter, implying the function is variadic. *) method resolve_reglhs_type: register_t -> string -> string -> btype_t option diff --git a/CodeHawk/CHB/bchlib/bCHPostcondition.ml b/CodeHawk/CHB/bchlib/bCHPostcondition.ml index 09f45f9c2..d24eaacae 100644 --- a/CodeHawk/CHB/bchlib/bCHPostcondition.ml +++ b/CodeHawk/CHB/bchlib/bCHPostcondition.ml @@ -88,7 +88,6 @@ let read_xml_postcondition | "not-null" -> XXNotNull (get_term (arg 0)) | "null-terminated" -> XXNullTerminated (get_term (arg 0)) | "enum" -> XXEnum (get_term (arg 0), pNode#getAttribute "name", false) - | "non-returning" -> XXFalse | "or" -> XXDisjunction (List.map aux pNode#getChildren) | "implies" -> let condition = @@ -106,9 +105,7 @@ let read_xml_postcondition STR "Postcondition predicate "; STR s; STR " not recognized"]) in - match (node#getTaggedChild "math")#getChild#getTag with - | "non-returning" -> XXFalse - | _ -> aux ((node#getTaggedChild "math")#getTaggedChild "apply") + aux ((node#getTaggedChild "math")#getTaggedChild "apply") let read_xml_postconditions @@ -137,7 +134,6 @@ let read_xml_shortcut_postconditions match n#getTag with | "post" | "error-post" -> (p, ep) | "enum" -> ((XXEnum (rv, n#getAttribute "name", false)):: p, ep) - | "non-returning" -> (XXFalse :: p, ep) | "null-terminated" -> ((XXNullTerminated rv) :: p, ep) | "notzero-zero" | "nonzero-zero" -> ((XXRelationalExpr (PNotEqual, rv, zero)) :: p, diff --git a/CodeHawk/CHB/bchlib/bCHSideeffect.ml b/CodeHawk/CHB/bchlib/bCHSideeffect.ml index 20b3a7f2c..f8815540a 100644 --- a/CodeHawk/CHB/bchlib/bCHSideeffect.ml +++ b/CodeHawk/CHB/bchlib/bCHSideeffect.ml @@ -151,7 +151,6 @@ let read_xml_sideeffect | "starts-thread" -> XXStartsThread (get_term (arg 0), List.map get_term (List.tl argNodes)) | "invalidates" -> XXInvalidated (get_term (arg 0)) - | "sets-errno" -> XXSetsErrno | "implies" -> let condition = List.hd @@ -185,10 +184,7 @@ let read_xml_sideeffect STR "Sideeffect predicate "; STR s; STR " not recognized"]) in - match (node#getTaggedChild "math")#getChild#getTag with - | "sets-errno" -> XXSetsErrno - (* | "unknown-sideeffect" -> UnknownSideeffect *) - | _ -> aux ((node#getTaggedChild "math")#getTaggedChild "apply") + aux ((node#getTaggedChild "math")#getTaggedChild "apply") let read_xml_sideeffects diff --git a/CodeHawk/CHB/bchlib/bCHSumTypeSerializer.ml b/CodeHawk/CHB/bchlib/bCHSumTypeSerializer.ml index 0a89b0d8a..58a398aaf 100644 --- a/CodeHawk/CHB/bchlib/bCHSumTypeSerializer.ml +++ b/CodeHawk/CHB/bchlib/bCHSumTypeSerializer.ml @@ -430,9 +430,7 @@ object | XXBlockWrite _ -> "bw" | XXBuffer _ -> "b" | XXEnum _ -> "e" - | XXFalse -> "f" | XXFreed _ -> "fr" - | XXFunctional -> "fn" | XXFunctionPointer _ -> "fp" | XXIncludes _ -> "inc" | XXInitialized _ -> "i" @@ -453,7 +451,6 @@ object | XXNullTerminated _ -> "nt" | XXOutputFormatString _ -> "ofs" | XXRelationalExpr _ -> "x" - | XXSetsErrno -> "errno" | XXStartsThread _ -> "st" | XXTainted _ -> "t" | XXTrustedString _ -> "ts" @@ -466,7 +463,7 @@ object | XXConditional _ -> "con" method !tags = [ - "ab"; "b"; "bw"; "con"; "dis"; "e"; "f"; "fn"; "fp"; "fr"; "ga"; + "ab"; "b"; "bw"; "con"; "dis"; "e"; "fp"; "fr"; "ga"; "ha"; "i"; "ifs"; "inc"; "inv"; "ir"; "m"; "nm"; "nn"; "nng"; "no"; "nt"; "nu"; "nz"; "ofs"; "pos"; "sa"; "st"; "t"; "tc"; "tfa"; "tfs"; "ts"; "v"; "wfs"; "x" @@ -488,9 +485,7 @@ object | XPOBlockWrite _ -> "bw" | XPOBuffer _ -> "b" | XPOEnum _ -> "e" - | XPOFalse -> "f" | XPOFreed _ -> "fr" - | XPOFunctional -> "fn" | XPOFunctionPointer _ -> "fp" | XPOIncludes _ -> "inc" | XPOInitialized _ -> "i" @@ -511,7 +506,6 @@ object | XPONullTerminated _ -> "nt" | XPOOutputFormatString _ -> "ofs" | XPORelationalExpr _ -> "x" - | XPOSetsErrno -> "errno" | XPOStartsThread _ -> "st" | XPOTainted _ -> "t" | XPOTrustedString _ -> "ts" @@ -524,7 +518,7 @@ object | XPOConditional _ -> "con" method !tags = [ - "ab"; "b"; "bw"; "con"; "dis"; "e"; "f"; "fn"; "fp"; "fr"; "ga"; + "ab"; "b"; "bw"; "con"; "dis"; "e"; "fp"; "fr"; "ga"; "ha"; "i"; "ifs"; "inc"; "inv"; "ir"; "m"; "nm"; "nn"; "nng"; "no"; "nt"; "nu"; "nz"; "ofs"; "pos"; "sa"; "st"; "t"; "tc"; "tfa"; "tfs"; "ts"; "v"; "wfs"; "x" @@ -555,8 +549,9 @@ object | ArgFunctionPointer -> "fp" | ArgScalarValue -> "s" | ArgOutputFormatString -> "fmt" + | ArgInputFormatString -> "ifs" - method !tags = ["d"; "fmt"; "fp"; "r"; "rw"; "s"; "w"] + method !tags = ["d"; "fmt"; "fp"; "ifs"; "r"; "rw"; "s"; "w"] end @@ -599,6 +594,8 @@ object | FlowsToArg _ -> "fta" | FlowsToOperation _ -> "fto" | FlowsFrom _ -> "ffm" + | FOutputFormatString -> "fofs" + | FInputFormatString -> "fifs" | Load -> "l" | Store -> "s" | Deref -> "d" @@ -608,8 +605,8 @@ object | OffsetAccessA _ -> "aa" method !tags = [ - "a"; "aa"; "d"; "faw"; "ffm"; "fr"; "fs"; "fta"; "fto"; "fx"; "l"; - "lsb"; "lsh"; "s"; "sa"] + "a"; "aa"; "d"; "faw"; "ffm"; "fifs"; "fofs"; "fr"; "fs"; "fta"; "fto"; + "fx"; "l"; "lsb"; "lsh"; "s"; "sa"] end diff --git a/CodeHawk/CHB/bchlib/bCHTypeConstraintDictionary.ml b/CodeHawk/CHB/bchlib/bCHTypeConstraintDictionary.ml index f4ee9ce4c..bf8a1b665 100644 --- a/CodeHawk/CHB/bchlib/bCHTypeConstraintDictionary.ml +++ b/CodeHawk/CHB/bchlib/bCHTypeConstraintDictionary.ml @@ -94,7 +94,8 @@ object (self) | ArgDeallocate | ArgFunctionPointer | ArgScalarValue - | ArgOutputFormatString -> (tags, []) in + | ArgOutputFormatString + | ArgInputFormatString -> (tags, []) in type_arg_mode_table#add key method get_type_arg_mode (index: int): type_arg_mode_t = @@ -107,6 +108,7 @@ object (self) | "d" -> ArgDeallocate | "fmt" -> ArgOutputFormatString | "fp" -> ArgFunctionPointer + | "ifs" -> ArgInputFormatString | "r" -> ArgDerefRead (getsize ()) | "rw" -> ArgDerefReadWrite (getsize ()) | "s" -> ArgScalarValue @@ -155,6 +157,8 @@ object (self) | FlowsFrom t -> (tags, [match t with Some t -> id#index_bterm t | _ -> (-1)]) + | FOutputFormatString -> (tags, []) + | FInputFormatString -> (tags, []) | Load -> (tags, []) | Store -> (tags, []) | Deref -> (tags, []) @@ -185,6 +189,8 @@ object (self) | "fto" -> FlowsToOperation (type_operation_kind_mfts#fs (t 1), if (a 0) = (-1) then None else Some (id#get_bterm (a 0))) + | "fofs" -> FOutputFormatString + | "fifs" -> FInputFormatString | "a" -> OffsetAccess (a 0, a 1) | "aa" -> OffsetAccessA (a 0, a 1) | s -> raise_tag_error name s type_cap_label_mcts#tags diff --git a/CodeHawk/CHB/bchlib/bCHTypeConstraintStore.ml b/CodeHawk/CHB/bchlib/bCHTypeConstraintStore.ml index 06ec304b5..371e1df4c 100644 --- a/CodeHawk/CHB/bchlib/bCHTypeConstraintStore.ml +++ b/CodeHawk/CHB/bchlib/bCHTypeConstraintStore.ml @@ -564,7 +564,9 @@ object (self) method resolve_function_type (faddr: string) - : (register_t * btype_t option * b_attributes_t) list * btype_t option = + : (register_t * btype_t option * b_attributes_t) list + * btype_t option + * bool = let evaluation = self#evaluate_function_type faddr in let result = H.create 4 in let returnresult = ref None in @@ -752,7 +754,15 @@ object (self) "return: " ^ (match !returnresult with | Some ty -> btype_to_string ty | _ -> "?")] in - (result, !returnresult) + let varargs = + H.fold (fun _k capslists acc -> + acc + || List.exists + (fun caps -> + List.mem FOutputFormatString caps + || List.mem FInputFormatString caps) capslists) + capresult false in + (result, !returnresult, varargs) method resolve_reglhs_type (reg: register_t) (faddr: string) (iaddr: string): btype_t option = diff --git a/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.ml b/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.ml index cbfb44a37..a85430690 100644 --- a/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.ml +++ b/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.ml @@ -74,6 +74,9 @@ let _type_arg_mode_compare (m1: type_arg_mode_t) (m2: type_arg_mode_t): int = | (ArgScalarValue, _) -> -1 | (_, ArgScalarValue) -> 1 | (ArgOutputFormatString, ArgOutputFormatString) -> 0 + | (ArgOutputFormatString, _) -> -1 + | (_, ArgOutputFormatString) -> 1 + | (ArgInputFormatString, ArgInputFormatString) -> 0 let type_cap_label_compare (c1: type_cap_label_t) (c2: type_cap_label_t) = @@ -134,6 +137,12 @@ let type_cap_label_compare (c1: type_cap_label_t) (c2: type_cap_label_t) = | (_, OffsetAccess _) -> 1 | (OffsetAccessA (n1, m1), OffsetAccessA (n2, m2)) -> Stdlib.compare (n1, m1) (n2, m2) + | (OffsetAccessA _, _) -> -1 + | (_, OffsetAccessA _) -> 1 + | (FOutputFormatString, FOutputFormatString) -> 0 + | (FOutputFormatString, _) -> -1 + | (_, FOutputFormatString) -> 1 + | (FInputFormatString, FInputFormatString) -> 0 let type_arg_mode_to_string (m: type_arg_mode_t) = @@ -149,6 +158,7 @@ let type_arg_mode_to_string (m: type_arg_mode_t) = | ArgFunctionPointer -> "fp" | ArgScalarValue -> "sv" | ArgOutputFormatString -> "ofs" + | ArgInputFormatString -> "ifs" let type_operation_kind_to_string (op: type_operation_kind_t) = @@ -180,6 +190,8 @@ let type_cap_label_to_string (c: type_cap_label_t) = ^ (type_operation_kind_to_string op) ^ (optbterm_to_string t) | FlowsFrom t -> "flowsfrom" ^ (optbterm_to_string t) + | FOutputFormatString -> "output-format-string" + | FInputFormatString -> "input-format-string" | Load -> "load" | Store -> "store" | Deref -> "deref" @@ -469,6 +481,14 @@ let add_stack_address_capability (offset: int) (tv: type_variable_t) add_capability [FLocStackAddress offset] tv +let add_output_format_string_capability (tv: type_variable_t): type_variable_t = + add_capability [FOutputFormatString] tv + + +let add_input_format_string_capability (tv: type_variable_t): type_variable_t = + add_capability [FInputFormatString] tv + + let convert_function_capabilities_to_attributes (paramindex: int) (caps: type_cap_label_t list): b_attributes_t = let type_arg_mode_to_cons_attrparam (m: type_arg_mode_t) = @@ -484,6 +504,7 @@ let convert_function_capabilities_to_attributes | ArgFunctionPointer -> ACons ("fp", []) | ArgScalarValue -> ACons ("sv", []) | ArgOutputFormatString -> ACons ("printf_format_string", []) + | ArgInputFormatString -> ACons ("scanf_format_string", []) in let result = new CHUtils.IntCollections.set_t in let _ = @@ -498,6 +519,14 @@ let convert_function_capabilities_to_attributes AInt argindex; type_arg_mode_to_cons_attrparam mode]) in result#add (bcd#index_attribute attr) + | FOutputFormatString -> + let attr = + Attr ("format", [ACons ("printf", []); AInt paramindex; AInt 0]) in + result#add (bcd#index_attribute attr) + | FInputFormatString -> + let attr = + Attr ("format", [ACons ("scanf", []); AInt paramindex; AInt 0]) in + result#add (bcd#index_attribute attr) | _ -> ()) caps in List.map bcd#get_attribute result#toList diff --git a/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.mli b/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.mli index 25fddebef..70b1c4904 100644 --- a/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.mli +++ b/CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.mli @@ -245,6 +245,22 @@ val add_flows_from_capability: val add_stack_address_capability: int -> type_variable_t -> type_variable_t +(** [add_output_format_string_capability tv] returns a new type variable that + appends an [FOutputFormatString] capability to [tv], which is expected to + already carry an [FRegParameter] prefix (set via [add_freg_param_capability]). + Indicates that the named parameter is a printf-style format string parameter + and thus the enclosing function is variadic. *) +val add_output_format_string_capability: type_variable_t -> type_variable_t + + +(** [add_input_format_string_capability tv] returns a new type variable that + appends an [FInputFormatString] capability to [tv], which is expected to + already carry an [FRegParameter] prefix (set via [add_freg_param_capability]). + Indicates that the named parameter is a scanf-style format string parameter + and thus the enclosing function is variadic. *) +val add_input_format_string_capability: type_variable_t -> type_variable_t + + val drop_capability: type_cap_label_t -> type_variable_t -> type_variable_t diff --git a/CodeHawk/CHB/bchlib/bCHVersion.ml b/CodeHawk/CHB/bchlib/bCHVersion.ml index f463a4e50..ff5e00608 100644 --- a/CodeHawk/CHB/bchlib/bCHVersion.ml +++ b/CodeHawk/CHB/bchlib/bCHVersion.ml @@ -95,8 +95,8 @@ end let version = new version_info_t - ~version:"0.6.0_20260601" - ~date:"2026-06-01" + ~version:"0.6.0_20260611" + ~date:"2026-06-11" ~licensee: None ~maxfilesize: None () diff --git a/CodeHawk/CHB/bchlib/bCHXPODictionary.ml b/CodeHawk/CHB/bchlib/bCHXPODictionary.ml index 478bf4947..94149ec70 100644 --- a/CodeHawk/CHB/bchlib/bCHXPODictionary.ml +++ b/CodeHawk/CHB/bchlib/bCHXPODictionary.ml @@ -100,9 +100,7 @@ object (self) | XPOBlockWrite (ty, x1, x2) -> (tags, [it ty; ix x1; ix x2]) | XPOBuffer (ty, x1, x2) -> (tags, [it ty; ix x1; ix x2]) | XPOEnum (x, s, b) -> (tags, [ix x; bd#index_string s; ib b]) - | XPOFalse -> (tags, []) | XPOFreed x -> (tags, [ix x]) - | XPOFunctional -> (tags, []) | XPOFunctionPointer (ty, x) -> (tags, [it ty; ix x]) | XPOIncludes (x, c) -> (tags, [ix x; id#index_c_struct_constant c]) | XPOInitialized x -> (tags, [ix x]) @@ -124,7 +122,6 @@ object (self) | XPOOutputFormatString x -> (tags, [ix x]) | XPORelationalExpr (op, x1, x2) -> (tags @ [relational_op_mfts#ts op], [ix x1; ix x2]) - | XPOSetsErrno -> (tags, []) | XPOStartsThread (x, xl) -> (tags, (ix x) :: (List.map ix xl)) | XPOTainted x -> (tags, [ix x]) | XPOTrustedString x -> (tags, [ix x]) diff --git a/CodeHawk/CHB/bchlib/bCHXPOPredicate.ml b/CodeHawk/CHB/bchlib/bCHXPOPredicate.ml index e102add38..23df214f4 100644 --- a/CodeHawk/CHB/bchlib/bCHXPOPredicate.ml +++ b/CodeHawk/CHB/bchlib/bCHXPOPredicate.ml @@ -69,9 +69,7 @@ let rec xxp_to_xpo_predicate | XXBlockWrite (ty, t1, t2) -> XPOBlockWrite (ty, btx t1, btx t2) | XXBuffer (ty, t1, t2) -> XPOBuffer (ty, btx t1, btx t2) | XXEnum (t, s, b) -> XPOEnum (btx t, s, b) - | XXFalse -> XPOFalse | XXFreed t -> XPOFreed (btx t) - | XXFunctional -> XPOFunctional | XXFunctionPointer (ty, t) -> XPOFunctionPointer (ty, btx t) | XXIncludes (t, c) -> XPOIncludes (btx t, c) | XXInitialized t -> XPOInitialized (btx t) @@ -92,7 +90,6 @@ let rec xxp_to_xpo_predicate | XXNullTerminated t -> XPONullTerminated (btx t) | XXOutputFormatString t -> XPOOutputFormatString (btx t) | XXRelationalExpr (op, t1, t2) -> XPORelationalExpr (op, btx t1, btx t2) - | XXSetsErrno -> XPOSetsErrno | XXStartsThread (t1, t2) -> XPOStartsThread (btx t1, List.map btx t2) | XXTainted t -> XPOTainted (btx t) | XXTrustedString t -> XPOTrustedString (btx t) @@ -138,9 +135,7 @@ let rec xpo_predicate_to_pretty (p: xpo_predicate_t) = | XPOEnum (t, s, b) -> LBLOCK [ x2p t; STR ": member of "; STR s; (if b then STR " (flags)" else STR "")] - | XPOFalse -> STR "false" | XPOFreed t -> default "freed" [t] - | XPOFunctional -> STR "functional" | XPOFunctionPointer (ty, t) -> LBLOCK [ STR "function-pointer("; @@ -177,7 +172,6 @@ let rec xpo_predicate_to_pretty (p: xpo_predicate_t) = | XPOPositive t -> default "positive" [t] | XPORelationalExpr (op, t1, t2) -> LBLOCK [x2p t1; STR (relational_op_to_string op); x2p t2] - | XPOSetsErrno -> STR "sets errno" | XPOStartsThread (t, tt) -> default "starts-thread" (t :: tt) | XPOTainted t -> default "tainted" [t] | XPOTrustedString t -> default "trusted-string" [t] diff --git a/CodeHawk/CHB/bchlibarm32/bCHARMAnalysisResults.ml b/CodeHawk/CHB/bchlibarm32/bCHARMAnalysisResults.ml index 4f824b879..85edb454d 100644 --- a/CodeHawk/CHB/bchlibarm32/bCHARMAnalysisResults.ml +++ b/CodeHawk/CHB/bchlibarm32/bCHARMAnalysisResults.ml @@ -318,13 +318,16 @@ object (self) fnadata#write_xml node; (if mksignature then let fname = - BCHFunctionData.get_default_functionsummary_name_dw - fn#get_address in + if fndata#has_name then + fndata#get_function_name + else + BCHFunctionData.get_default_functionsummary_name_dw + fn#get_address in let resolvents = typeconstraintstore#resolve_function_type faddr in let ftype = BCHFunctionInterface.function_type_resolvents_to_bfuntype fname resolvents in - let (regtypes, _) = resolvents in + let (regtypes, _, _) = resolvents in let attrs = List.concat (List.map (fun (_, _, a) -> a) regtypes) in let attrs = (BCHFunctionSemanticsAttributes.convert_semantics_to_attributes finfo) diff --git a/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml b/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml index ca68abb5e..26c1a0799 100644 --- a/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml +++ b/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml @@ -297,14 +297,14 @@ object (self) let typevar = mk_function_typevar faddr in TR.tfold ~ok:(fun reg -> - let typevar = add_freg_param_capability reg typevar in + let typevar_param = add_freg_param_capability reg typevar in let typevar = add_flows_to_arg_capability - iaddr call argindex argmode typevar in + iaddr call argindex argmode typevar_param in let rule = "BL-arg-param" in let opttc = mk_btype_constraint ~use_voidptr:true typevar argtype in - match opttc with + (match opttc with | Some tc -> if fndata#is_typing_rule_enabled iaddr rule then begin @@ -319,7 +319,39 @@ object (self) ~msg:(p2s floc#l#toPretty) __FILE__ __LINE__ ["x: " ^ (x2s x); - "btype: " ^ (btype_to_string argtype)]) + "btype: " ^ (btype_to_string argtype)]); + (match argmode with + | ArgOutputFormatString -> + let typevar_fmt = + add_output_format_string_capability typevar_param in + let opttc = + mk_btype_constraint ~use_voidptr:true typevar_fmt argtype in + (match opttc with + | Some tc -> + if fndata#is_typing_rule_enabled iaddr rule then + begin + log_type_constraint __LINE__ rule tc; + store#add_constraint faddr iaddr rule tc + end + else + log_type_constraint_rule_disabled __LINE__ rule tc + | _ -> ()) + | ArgInputFormatString -> + let typevar_fmt = + add_input_format_string_capability typevar_param in + let opttc = + mk_btype_constraint ~use_voidptr:true typevar_fmt argtype in + (match opttc with + | Some tc -> + if fndata#is_typing_rule_enabled iaddr rule then + begin + log_type_constraint __LINE__ rule tc; + store#add_constraint faddr iaddr rule tc + end + else + log_type_constraint_rule_disabled __LINE__ rule tc + | _ -> ()) + | _ -> ())) ~error:(fun e -> log_diagnostics_result ~tag:mnem diff --git a/CodeHawk/CHB/bchsummaries/jni/jni_18.xml b/CodeHawk/CHB/bchsummaries/jni/jni_18.xml index ebde2fe9a..6b24e258c 100644 --- a/CodeHawk/CHB/bchsummaries/jni/jni_18.xml +++ b/CodeHawk/CHB/bchsummaries/jni/jni_18.xml @@ -42,14 +42,12 @@ void - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/DebugBreak.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/DebugBreak.xml index 55ffccacc..5fa7eb088 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/DebugBreak.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/DebugBreak.xml @@ -21,14 +21,12 @@ - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitProcess.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitProcess.xml index 5e3718a8c..f30355b29 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitProcess.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitProcess.xml @@ -19,18 +19,12 @@ - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitThread.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitThread.xml index 2d65be79e..49d7336f9 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitThread.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/ExitThread.xml @@ -19,18 +19,12 @@ - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/FatalAppExit.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/FatalAppExit.xml index 03dd70c84..2300a2a73 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/FatalAppExit.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/FatalAppExit.xml @@ -33,15 +33,13 @@ - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/FreeLibraryAndExitThread.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/FreeLibraryAndExitThread.xml index 87fd62aee..16145e5f2 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/FreeLibraryAndExitThread.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/FreeLibraryAndExitThread.xml @@ -42,15 +42,13 @@ VOID - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/kernel32_dll/RaiseException.xml b/CodeHawk/CHB/bchsummaries/kernel32_dll/RaiseException.xml index cabb401ac..e221fc933 100644 --- a/CodeHawk/CHB/bchsummaries/kernel32_dll/RaiseException.xml +++ b/CodeHawk/CHB/bchsummaries/kernel32_dll/RaiseException.xml @@ -47,7 +47,7 @@ - + @@ -63,13 +63,7 @@ - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_CxxThrowException.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_CxxThrowException.xml index ae6c34a6b..3e86a3281 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_CxxThrowException.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_CxxThrowException.xml @@ -34,14 +34,12 @@ void - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_amsg_exit.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_amsg_exit.xml index 9fb1ded95..3dfef7cdb 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_amsg_exit.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_amsg_exit.xml @@ -22,15 +22,9 @@ int - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_assert.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_assert.xml index a3a0240c1..0e06f0516 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_assert.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_assert.xml @@ -39,14 +39,12 @@ void - + - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_exit.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_exit.xml index b087a5195..654932178 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_exit.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_exit.xml @@ -19,19 +19,13 @@ - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_fileno.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_fileno.xml index c5339cfe2..4aefa6f57 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_fileno.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_fileno.xml @@ -24,7 +24,7 @@ - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_setmode.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_setmode.xml index 309551062..1b628e0c8 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/_setmode.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/_setmode.xml @@ -27,19 +27,13 @@ int - + - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/abort.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/abort.xml index b48ca69de..26582b2f5 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/abort.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/abort.xml @@ -15,18 +15,12 @@ void - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/exit.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/exit.xml index c0f4adad8..42f28be99 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/exit.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/exit.xml @@ -19,20 +19,14 @@ - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fgets.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fgets.xml index 1c86922b3..c73d29298 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fgets.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fgets.xml @@ -56,7 +56,7 @@
- + @@ -110,11 +110,6 @@ - - - - - diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fputc.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fputc.xml index 149c5f95d..f3a41928f 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fputc.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fputc.xml @@ -31,7 +31,7 @@
- + @@ -39,13 +39,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fread.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fread.xml index 9ee93ae39..602518bfe 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/fread.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/fread.xml @@ -48,7 +48,7 @@
- + @@ -99,11 +99,6 @@ - - - - - diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/ftell.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/ftell.xml index ac6446680..7d31037c0 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/ftell.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/ftell.xml @@ -24,7 +24,7 @@ - + @@ -33,13 +33,7 @@ - - - - - - - + Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/gmtime.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/gmtime.xml index 936976744..6a02bb6fa 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/gmtime.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/gmtime.xml @@ -33,7 +33,7 @@
- + @@ -41,13 +41,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/localtime.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/localtime.xml index 88078c886..28d23f779 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/localtime.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/localtime.xml @@ -24,7 +24,7 @@ - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/signal.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/signal.xml index f59ff3aff..afcc12dfd 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/signal.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/signal.xml @@ -32,19 +32,13 @@
- + - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtol.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtol.xml index 52ac4a191..8925b2314 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtol.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtol.xml @@ -34,19 +34,13 @@ int - + - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtoul.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtoul.xml index 56e508595..19b8bdfdf 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtoul.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strtoul.xml @@ -34,19 +34,13 @@ int - + - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strxfrm.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strxfrm.xml index 1d7025098..04a072ce1 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/strxfrm.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/strxfrm.xml @@ -42,7 +42,7 @@ size_t - + @@ -80,11 +80,6 @@ - - - - - diff --git a/CodeHawk/CHB/bchsummaries/msvcrt_dll/vfprintf.xml b/CodeHawk/CHB/bchsummaries/msvcrt_dll/vfprintf.xml index 05e622b6c..71447c52a 100644 --- a/CodeHawk/CHB/bchsummaries/msvcrt_dll/vfprintf.xml +++ b/CodeHawk/CHB/bchsummaries/msvcrt_dll/vfprintf.xml @@ -42,7 +42,7 @@ VOID - + @@ -51,13 +51,7 @@ 0 0 - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/__fgetc_unlocked.xml b/CodeHawk/CHB/bchsummaries/so_functions/__fgetc_unlocked.xml index 37108783f..8248fa833 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/__fgetc_unlocked.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/__fgetc_unlocked.xml @@ -24,20 +24,14 @@ int - + - - - - - - - + Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/__fputc_unlocked.xml b/CodeHawk/CHB/bchsummaries/so_functions/__fputc_unlocked.xml index 102fda47a..3df3b5a03 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/__fputc_unlocked.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/__fputc_unlocked.xml @@ -31,7 +31,7 @@
- + @@ -39,13 +39,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/__uClibc_main.xml b/CodeHawk/CHB/bchsummaries/so_functions/__uClibc_main.xml index 35882f383..6a53ea709 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/__uClibc_main.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/__uClibc_main.xml @@ -51,16 +51,10 @@ void - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/so_functions/_exit.xml b/CodeHawk/CHB/bchsummaries/so_functions/_exit.xml index 2eb16807a..ec9ecde76 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/_exit.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/_exit.xml @@ -19,19 +19,13 @@ - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/so_functions/abort.xml b/CodeHawk/CHB/bchsummaries/so_functions/abort.xml index a15618e29..ec07bb625 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/abort.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/abort.xml @@ -13,20 +13,14 @@ void - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/so_functions/accept.xml b/CodeHawk/CHB/bchsummaries/so_functions/accept.xml index b7dcd082e..8e918df90 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/accept.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/accept.xml @@ -49,7 +49,7 @@ int - +
@@ -77,11 +77,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/access.xml b/CodeHawk/CHB/bchsummaries/so_functions/access.xml
index c0a1dd7c0..ad2404123 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/access.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/access.xml
@@ -33,7 +33,7 @@
     
     int
    
-   
+   
     
        
     
@@ -41,13 +41,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/bind.xml b/CodeHawk/CHB/bchsummaries/so_functions/bind.xml
index 178842003..27d366842 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/bind.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/bind.xml
@@ -41,7 +41,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -58,13 +58,7 @@
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/chmod.xml b/CodeHawk/CHB/bchsummaries/so_functions/chmod.xml
index a35fc9711..4b1914fce 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/chmod.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/chmod.xml
@@ -30,19 +30,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/chown.xml b/CodeHawk/CHB/bchsummaries/so_functions/chown.xml
index 0a59b761c..148b96376 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/chown.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/chown.xml
@@ -35,19 +35,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/chroot.xml b/CodeHawk/CHB/bchsummaries/so_functions/chroot.xml
index 5c1bed6f3..fe782f692 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/chroot.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/chroot.xml
@@ -21,19 +21,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/close.xml b/CodeHawk/CHB/bchsummaries/so_functions/close.xml
index a691685b1..8320cfde9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/close.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/close.xml
@@ -20,19 +20,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2019, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/closedir.xml b/CodeHawk/CHB/bchsummaries/so_functions/closedir.xml
index a9fbce1ee..72359a0db 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/closedir.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/closedir.xml
@@ -21,19 +21,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/connect.xml b/CodeHawk/CHB/bchsummaries/so_functions/connect.xml
index dd5b5afcc..9fe097a79 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/connect.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/connect.xml
@@ -43,7 +43,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -60,13 +60,7 @@
       
         
       
-      
-	
-	  
-            
-	  
-	
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/execl.xml b/CodeHawk/CHB/bchsummaries/so_functions/execl.xml
index 88fc54711..1e0c0014e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/execl.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/execl.xml
@@ -34,12 +34,10 @@
       
       int
     
-    
+    
       
       
-      
-	
-      
+      
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/exit.xml b/CodeHawk/CHB/bchsummaries/so_functions/exit.xml
index 922592e13..d5b68a5af 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/exit.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/exit.xml
@@ -19,20 +19,14 @@
      
     
    
-   
+   
      
        
        
      
     
-    
-     
-      
-       
-      
-     
-    
+    
     
    
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fdopen.xml b/CodeHawk/CHB/bchsummaries/so_functions/fdopen.xml
index e03ba7b09..a25f3190d 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/fdopen.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/fdopen.xml
@@ -35,7 +35,7 @@
     
     ch__FILE
    
-   
+   
     
        
     
@@ -43,13 +43,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fgetc.xml b/CodeHawk/CHB/bchsummaries/so_functions/fgetc.xml
index 486d12802..2b81c849e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/fgetc.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/fgetc.xml
@@ -24,7 +24,7 @@
     
     int
    
-   
+   
     
      
@@ -33,13 +33,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fgets.xml b/CodeHawk/CHB/bchsummaries/so_functions/fgets.xml
index f6b2282a5..4608805e2 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/fgets.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/fgets.xml
@@ -56,7 +56,7 @@
      
- + @@ -110,11 +110,6 @@ - - - - -
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fileno.xml b/CodeHawk/CHB/bchsummaries/so_functions/fileno.xml index 398a05638..7b9204322 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fileno.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fileno.xml @@ -24,7 +24,7 @@ - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/flock.xml b/CodeHawk/CHB/bchsummaries/so_functions/flock.xml index e9820e5f9..f9bbe5b8b 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/flock.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/flock.xml @@ -31,19 +31,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fopen.xml b/CodeHawk/CHB/bchsummaries/so_functions/fopen.xml index 3eb0d7296..99bfb21db 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fopen.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fopen.xml @@ -29,7 +29,7 @@
- + @@ -37,13 +37,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fopen64.xml b/CodeHawk/CHB/bchsummaries/so_functions/fopen64.xml index c171b9bfc..52624c3e5 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fopen64.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fopen64.xml @@ -29,7 +29,7 @@
- + @@ -37,13 +37,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fputc.xml b/CodeHawk/CHB/bchsummaries/so_functions/fputc.xml index ba6d072aa..a7de5598b 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fputc.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fputc.xml @@ -31,7 +31,7 @@
- + @@ -39,13 +39,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fputs.xml b/CodeHawk/CHB/bchsummaries/so_functions/fputs.xml index cdcc051a0..c2deb3209 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fputs.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fputs.xml @@ -37,7 +37,7 @@
- + @@ -45,13 +45,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fread.xml b/CodeHawk/CHB/bchsummaries/so_functions/fread.xml index a58134d92..7f266545c 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fread.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fread.xml @@ -48,7 +48,7 @@
- + @@ -99,11 +99,6 @@ - - - - - diff --git a/CodeHawk/CHB/bchsummaries/so_functions/freeaddrinfo.xml b/CodeHawk/CHB/bchsummaries/so_functions/freeaddrinfo.xml index 766f0fb75..c311b0113 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/freeaddrinfo.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/freeaddrinfo.xml @@ -20,19 +20,13 @@ void - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fseek.xml b/CodeHawk/CHB/bchsummaries/so_functions/fseek.xml index 62e0c1f7b..9ef7be9ea 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fseek.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fseek.xml @@ -38,7 +38,7 @@ int - + @@ -46,13 +46,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fstat.xml b/CodeHawk/CHB/bchsummaries/so_functions/fstat.xml index 4be3e1d9a..d46bc1782 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fstat.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fstat.xml @@ -33,19 +33,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fstat64.xml b/CodeHawk/CHB/bchsummaries/so_functions/fstat64.xml index eaac3cdad..fa672596b 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fstat64.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fstat64.xml @@ -33,19 +33,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/ftell.xml b/CodeHawk/CHB/bchsummaries/so_functions/ftell.xml index dfedd3563..f75e8a17b 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/ftell.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/ftell.xml @@ -24,7 +24,7 @@ - + @@ -33,13 +33,7 @@ - - - - - - - + Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/ftruncate.xml b/CodeHawk/CHB/bchsummaries/so_functions/ftruncate.xml index 4e6bb34e1..accc9bc50 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/ftruncate.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/ftruncate.xml @@ -29,19 +29,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/ftruncate64.xml b/CodeHawk/CHB/bchsummaries/so_functions/ftruncate64.xml index 0e2aa5bf2..68e35fe9d 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/ftruncate64.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/ftruncate64.xml @@ -29,19 +29,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/fwrite.xml b/CodeHawk/CHB/bchsummaries/so_functions/fwrite.xml index df8252b5d..7fd28f66d 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/fwrite.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/fwrite.xml @@ -43,7 +43,7 @@ - + @@ -79,13 +79,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getaddrinfo.xml b/CodeHawk/CHB/bchsummaries/so_functions/getaddrinfo.xml index 84586daff..7c460cb37 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/getaddrinfo.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/getaddrinfo.xml @@ -58,19 +58,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getcwd.xml b/CodeHawk/CHB/bchsummaries/so_functions/getcwd.xml index 8272b0d83..b8fa36200 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/getcwd.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/getcwd.xml @@ -33,7 +33,7 @@ char - +
@@ -77,11 +77,6 @@
             
           
         
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getgrgid.xml b/CodeHawk/CHB/bchsummaries/so_functions/getgrgid.xml
index aa3084b03..3995de38e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getgrgid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getgrgid.xml
@@ -20,19 +20,13 @@
       
       ch__group
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getgrnam.xml b/CodeHawk/CHB/bchsummaries/so_functions/getgrnam.xml
index d00509f9f..0cbe00346 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getgrnam.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getgrnam.xml
@@ -23,19 +23,13 @@
       
       ch__group
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getgroups.xml b/CodeHawk/CHB/bchsummaries/so_functions/getgroups.xml
index 182739d2d..e11eea0b0 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getgroups.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getgroups.xml
@@ -35,7 +35,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -67,11 +67,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/gethostbyname.xml b/CodeHawk/CHB/bchsummaries/so_functions/gethostbyname.xml
index bde8f2e64..373e3aca2 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/gethostbyname.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/gethostbyname.xml
@@ -20,19 +20,13 @@
       
       ch__hostent
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getline.xml b/CodeHawk/CHB/bchsummaries/so_functions/getline.xml
index a1f61dd05..46e4656e1 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getline.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getline.xml
@@ -36,19 +36,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getpeername.xml b/CodeHawk/CHB/bchsummaries/so_functions/getpeername.xml
index 4f75107ea..8e893eadd 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getpeername.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getpeername.xml
@@ -40,7 +40,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -68,11 +68,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getpriority.xml b/CodeHawk/CHB/bchsummaries/so_functions/getpriority.xml
index f629ed7d6..d79113053 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getpriority.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getpriority.xml
@@ -35,19 +35,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getpwnam.xml b/CodeHawk/CHB/bchsummaries/so_functions/getpwnam.xml
index 2305daffe..04b933517 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getpwnam.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getpwnam.xml
@@ -21,19 +21,13 @@
       
       ch__passwd
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getrlimit.xml b/CodeHawk/CHB/bchsummaries/so_functions/getrlimit.xml
index 224089515..2c730b19f 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getrlimit.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getrlimit.xml
@@ -30,19 +30,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getrlimit64.xml b/CodeHawk/CHB/bchsummaries/so_functions/getrlimit64.xml
index 0f1d40f16..27f96a34f 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getrlimit64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getrlimit64.xml
@@ -31,19 +31,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getrusage.xml b/CodeHawk/CHB/bchsummaries/so_functions/getrusage.xml
index 8139374b6..962f302d6 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getrusage.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getrusage.xml
@@ -34,19 +34,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getsockname.xml b/CodeHawk/CHB/bchsummaries/so_functions/getsockname.xml
index 4b50ce7d7..c0fba8752 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getsockname.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getsockname.xml
@@ -36,7 +36,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -72,11 +72,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getsockopt.xml b/CodeHawk/CHB/bchsummaries/so_functions/getsockopt.xml
index e5085065b..1c37a2c64 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getsockopt.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getsockopt.xml
@@ -46,7 +46,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -82,11 +82,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/getspnam.xml b/CodeHawk/CHB/bchsummaries/so_functions/getspnam.xml
index b52683761..772ef320a 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/getspnam.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/getspnam.xml
@@ -25,19 +25,13 @@
       
       ch__spwd
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/gmtime.xml b/CodeHawk/CHB/bchsummaries/so_functions/gmtime.xml
index 5a0722f4b..1eb1e499e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/gmtime.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/gmtime.xml
@@ -33,7 +33,7 @@
      
- + @@ -41,13 +41,7 @@ - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/if_indextoname.xml b/CodeHawk/CHB/bchsummaries/so_functions/if_indextoname.xml index 75be8aaa8..b5a7de23d 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/if_indextoname.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/if_indextoname.xml @@ -29,7 +29,7 @@ char - +
@@ -57,11 +57,6 @@
             
           
         
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/inet_ntop.xml b/CodeHawk/CHB/bchsummaries/so_functions/inet_ntop.xml
index 464e135d7..d1b918f49 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/inet_ntop.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/inet_ntop.xml
@@ -51,7 +51,7 @@
       
       char
     
-    
+    
       
       
 	
@@ -88,11 +88,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/inet_pton.xml b/CodeHawk/CHB/bchsummaries/so_functions/inet_pton.xml
index 36c6eff0d..989db78b1 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/inet_pton.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/inet_pton.xml
@@ -43,19 +43,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/ioctl.xml b/CodeHawk/CHB/bchsummaries/so_functions/ioctl.xml
index b8f117759..225d6fc54 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/ioctl.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/ioctl.xml
@@ -37,19 +37,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/kill.xml b/CodeHawk/CHB/bchsummaries/so_functions/kill.xml
index d836d5f50..c4690a30a 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/kill.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/kill.xml
@@ -31,19 +31,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/killpg.xml b/CodeHawk/CHB/bchsummaries/so_functions/killpg.xml
index 963319cb5..5007139cd 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/killpg.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/killpg.xml
@@ -29,7 +29,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -45,13 +45,7 @@
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/listen.xml b/CodeHawk/CHB/bchsummaries/so_functions/listen.xml
index f57cfd15e..39e5b8619 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/listen.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/listen.xml
@@ -35,19 +35,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/localtime.xml b/CodeHawk/CHB/bchsummaries/so_functions/localtime.xml
index f98ebe392..5b2dd54b9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/localtime.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/localtime.xml
@@ -24,7 +24,7 @@
       
     
    
-   
+   
      
        
      
@@ -32,13 +32,7 @@
     
      
     
-    
-     
-      
-       
-      
-     
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/lockf.xml b/CodeHawk/CHB/bchsummaries/so_functions/lockf.xml
index f92e38d5d..f7c6fbd02 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/lockf.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/lockf.xml
@@ -38,19 +38,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/lockf64.xml b/CodeHawk/CHB/bchsummaries/so_functions/lockf64.xml
index 6068c0b16..3603772e7 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/lockf64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/lockf64.xml
@@ -38,19 +38,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/lseek.xml b/CodeHawk/CHB/bchsummaries/so_functions/lseek.xml
index e81bf2a31..d333f9bc9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/lseek.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/lseek.xml
@@ -36,19 +36,13 @@
       
       off_t
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/lseek64.xml b/CodeHawk/CHB/bchsummaries/so_functions/lseek64.xml
index ed746d70c..c6022d4c9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/lseek64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/lseek64.xml
@@ -36,19 +36,13 @@
       
       off_t
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/malloc.xml b/CodeHawk/CHB/bchsummaries/so_functions/malloc.xml
index 728e9cf8a..2b90b0044 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/malloc.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/malloc.xml
@@ -24,7 +24,7 @@
      
     
    
-   
+   
      
        
      
@@ -48,13 +48,7 @@
       
      
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mkdir.xml b/CodeHawk/CHB/bchsummaries/so_functions/mkdir.xml
index facbd57d3..dc6b7570e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mkdir.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mkdir.xml
@@ -33,7 +33,7 @@
       
       int
     
-    
+    
       
 	
       
@@ -41,13 +41,7 @@
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mkstemp.xml b/CodeHawk/CHB/bchsummaries/so_functions/mkstemp.xml
index e68c063de..422cfc5fb 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mkstemp.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mkstemp.xml
@@ -23,19 +23,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mkstemp64.xml b/CodeHawk/CHB/bchsummaries/so_functions/mkstemp64.xml
index f549a6d5d..18e0e2bb9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mkstemp64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mkstemp64.xml
@@ -23,19 +23,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mktime.xml b/CodeHawk/CHB/bchsummaries/so_functions/mktime.xml
index fa2d79704..812b4fb85 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mktime.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mktime.xml
@@ -20,7 +20,7 @@
     
     time_t
    
-   
+   
     
       
     
@@ -28,13 +28,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
  
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mmap.xml b/CodeHawk/CHB/bchsummaries/so_functions/mmap.xml
index 9b97f00d6..90a85b6d8 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mmap.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mmap.xml
@@ -52,17 +52,11 @@
       
       void
     
-    
+    
       
       
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/mmap64.xml b/CodeHawk/CHB/bchsummaries/so_functions/mmap64.xml
index 0b4ec743f..a102968fa 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/mmap64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/mmap64.xml
@@ -52,17 +52,11 @@
       
       void
     
-    
+    
       
       
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/msgrcv.xml b/CodeHawk/CHB/bchsummaries/so_functions/msgrcv.xml
index 92e448a83..b3065c10e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/msgrcv.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/msgrcv.xml
@@ -46,7 +46,7 @@
       
       ssize_t
     
-    
+    
       
       
         
@@ -63,13 +63,7 @@
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/munmap.xml b/CodeHawk/CHB/bchsummaries/so_functions/munmap.xml
index b2bee55fe..e15bb911c 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/munmap.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/munmap.xml
@@ -33,19 +33,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/nanosleep.xml b/CodeHawk/CHB/bchsummaries/so_functions/nanosleep.xml
index 41142aa5b..c07028d8c 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/nanosleep.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/nanosleep.xml
@@ -31,19 +31,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/open.xml b/CodeHawk/CHB/bchsummaries/so_functions/open.xml
index 523d1fcef..fba56007b 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/open.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/open.xml
@@ -33,7 +33,7 @@
     
     int
    
-   
+   
      
        
      
@@ -41,13 +41,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/open64.xml b/CodeHawk/CHB/bchsummaries/so_functions/open64.xml
index b90cfbf51..79d652031 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/open64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/open64.xml
@@ -38,7 +38,7 @@
     
     int
    
-   
+   
      
        
      
@@ -46,13 +46,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/opendir.xml b/CodeHawk/CHB/bchsummaries/so_functions/opendir.xml
index 2d42f486f..07f1083c9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/opendir.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/opendir.xml
@@ -21,19 +21,13 @@
       
       ch__DIR
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/pclose.xml b/CodeHawk/CHB/bchsummaries/so_functions/pclose.xml
index 92e9c3c7e..e7872c220 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/pclose.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/pclose.xml
@@ -21,19 +21,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/pipe.xml b/CodeHawk/CHB/bchsummaries/so_functions/pipe.xml
index ed49041bf..8ceadf7b6 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/pipe.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/pipe.xml
@@ -20,7 +20,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -51,11 +51,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/poll.xml b/CodeHawk/CHB/bchsummaries/so_functions/poll.xml
index 3ec0e56af..1a7a318e0 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/poll.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/poll.xml
@@ -40,19 +40,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/popen.xml b/CodeHawk/CHB/bchsummaries/so_functions/popen.xml
index 2ed17abb5..25b173ec7 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/popen.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/popen.xml
@@ -31,7 +31,7 @@
       
       ch__FILE
     
-    
+    
       
       
         
@@ -46,13 +46,7 @@
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/pthread_exit.xml b/CodeHawk/CHB/bchsummaries/so_functions/pthread_exit.xml
index 7e4e99d1c..f2867b27a 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/pthread_exit.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/pthread_exit.xml
@@ -20,20 +20,14 @@
       
       void
     
-    
+    
       
        
        
       
       
-      
-	
-	  
-	    
-	  
-	
-      
+      
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/putenv.xml b/CodeHawk/CHB/bchsummaries/so_functions/putenv.xml
index 79e49e9ae..a89b13259 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/putenv.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/putenv.xml
@@ -30,19 +30,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/puts.xml b/CodeHawk/CHB/bchsummaries/so_functions/puts.xml
index 75a1b6d50..7fcd8cade 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/puts.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/puts.xml
@@ -27,7 +27,7 @@
     
     int
    
-   
+   
     
      
     
@@ -35,13 +35,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/read.xml b/CodeHawk/CHB/bchsummaries/so_functions/read.xml
index c73dfe7c7..228fd7748 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/read.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/read.xml
@@ -34,7 +34,7 @@
       
       ssize_t
     
-    
+    
       
       
 	
@@ -88,11 +88,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/readdir.xml b/CodeHawk/CHB/bchsummaries/so_functions/readdir.xml
index dd95a671c..a47000cc2 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/readdir.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/readdir.xml
@@ -21,19 +21,13 @@
       
       ch__dirent
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/readdir64.xml b/CodeHawk/CHB/bchsummaries/so_functions/readdir64.xml
index f794b3941..8ecbaf4c9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/readdir64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/readdir64.xml
@@ -21,19 +21,13 @@
       
       ch__dirent
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/readlink.xml b/CodeHawk/CHB/bchsummaries/so_functions/readlink.xml
index f3152e0ea..a78893006 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/readlink.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/readlink.xml
@@ -36,7 +36,7 @@
       
       ssize_t
     
-    
+    
       
 	
       
@@ -75,11 +75,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/realpath.xml b/CodeHawk/CHB/bchsummaries/so_functions/realpath.xml
index 440b182fe..0c348adc8 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/realpath.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/realpath.xml
@@ -41,7 +41,7 @@
       
       char
     
-    
+    
       
       
 	
@@ -67,11 +67,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/recv.xml b/CodeHawk/CHB/bchsummaries/so_functions/recv.xml
index 734acc07c..c41abc5cc 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/recv.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/recv.xml
@@ -44,7 +44,7 @@
       
       ssize_t
     
-    
+    
       
       
 	
@@ -89,11 +89,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/recvfrom.xml b/CodeHawk/CHB/bchsummaries/so_functions/recvfrom.xml
index fdc413d67..927e0c8df 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/recvfrom.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/recvfrom.xml
@@ -62,7 +62,7 @@
       
       ssize_t
     
-    
+    
       
       
 	
@@ -127,11 +127,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/recvmsg.xml b/CodeHawk/CHB/bchsummaries/so_functions/recvmsg.xml
index 727ce38ad..100550364 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/recvmsg.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/recvmsg.xml
@@ -41,19 +41,13 @@
       
       ssize_t
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/remove.xml b/CodeHawk/CHB/bchsummaries/so_functions/remove.xml
index bc107c3b9..b22b23959 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/remove.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/remove.xml
@@ -24,7 +24,7 @@
      
- + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/rename.xml b/CodeHawk/CHB/bchsummaries/so_functions/rename.xml index 765e5de96..f75b22d4a 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/rename.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/rename.xml @@ -31,19 +31,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/rewind.xml b/CodeHawk/CHB/bchsummaries/so_functions/rewind.xml index 404ada4b8..b9477f415 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/rewind.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/rewind.xml @@ -21,19 +21,13 @@ void - + - - - - - - - + Copyright 2012-2015, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/rmdir.xml b/CodeHawk/CHB/bchsummaries/so_functions/rmdir.xml index 20a255594..90a486c8a 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/rmdir.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/rmdir.xml @@ -24,7 +24,7 @@ int - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/select.xml b/CodeHawk/CHB/bchsummaries/so_functions/select.xml index 69a3c932e..3ca8a9f91 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/select.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/select.xml @@ -61,19 +61,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sem_init.xml b/CodeHawk/CHB/bchsummaries/so_functions/sem_init.xml index c74974d43..4a813734d 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/sem_init.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/sem_init.xml @@ -38,7 +38,7 @@ int - + @@ -46,13 +46,7 @@ - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sem_post.xml b/CodeHawk/CHB/bchsummaries/so_functions/sem_post.xml index abf19f274..f3c35d1d9 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/sem_post.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/sem_post.xml @@ -24,7 +24,7 @@ int - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sem_wait.xml b/CodeHawk/CHB/bchsummaries/so_functions/sem_wait.xml index 97d38a232..e8366684d 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/sem_wait.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/sem_wait.xml @@ -24,7 +24,7 @@ int - + @@ -32,13 +32,7 @@ - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/send.xml b/CodeHawk/CHB/bchsummaries/so_functions/send.xml index c0e91bf49..a5404c972 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/send.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/send.xml @@ -39,7 +39,7 @@ ssize_t - +
@@ -56,13 +56,7 @@
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sendmsg.xml b/CodeHawk/CHB/bchsummaries/so_functions/sendmsg.xml
index d1e67c4a1..37ba8dae9 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sendmsg.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sendmsg.xml
@@ -41,19 +41,13 @@
       
       ssize_t
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sendto.xml b/CodeHawk/CHB/bchsummaries/so_functions/sendto.xml
index 6e03d3fd7..78d94c73e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sendto.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sendto.xml
@@ -60,7 +60,7 @@
       
       ssize_t
     
-    
+    
       
       
 	
@@ -104,13 +104,7 @@
 	  
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setegid.xml b/CodeHawk/CHB/bchsummaries/so_functions/setegid.xml
index 45d45c349..c23d18e3e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setegid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setegid.xml
@@ -20,19 +20,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setenv.xml b/CodeHawk/CHB/bchsummaries/so_functions/setenv.xml
index a6172625b..afa266d97 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setenv.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setenv.xml
@@ -45,19 +45,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/seteuid.xml b/CodeHawk/CHB/bchsummaries/so_functions/seteuid.xml
index d15a858d8..3383de2ed 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/seteuid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/seteuid.xml
@@ -20,19 +20,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setgid.xml b/CodeHawk/CHB/bchsummaries/so_functions/setgid.xml
index 254896c22..85ad9548e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setgid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setgid.xml
@@ -23,19 +23,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sethostname.xml b/CodeHawk/CHB/bchsummaries/so_functions/sethostname.xml
index 1792b6b1b..154b23e03 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sethostname.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sethostname.xml
@@ -29,7 +29,7 @@
       
       int
     
-    
+    
       
       
         
@@ -46,13 +46,7 @@
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setpgid.xml b/CodeHawk/CHB/bchsummaries/so_functions/setpgid.xml
index 8e4765fab..b79537e64 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setpgid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setpgid.xml
@@ -29,19 +29,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setpriority.xml b/CodeHawk/CHB/bchsummaries/so_functions/setpriority.xml
index 633f3565c..8e624633b 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setpriority.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setpriority.xml
@@ -40,19 +40,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setrlimit.xml b/CodeHawk/CHB/bchsummaries/so_functions/setrlimit.xml
index 7809e0819..b945b6a4c 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setrlimit.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setrlimit.xml
@@ -32,19 +32,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setrlimit64.xml b/CodeHawk/CHB/bchsummaries/so_functions/setrlimit64.xml
index e30653c10..ee1d69063 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setrlimit64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setrlimit64.xml
@@ -32,19 +32,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setsid.xml b/CodeHawk/CHB/bchsummaries/so_functions/setsid.xml
index e88df7c23..ef355f0b6 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setsid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setsid.xml
@@ -18,19 +18,13 @@
     
       pid_t
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setsockopt.xml b/CodeHawk/CHB/bchsummaries/so_functions/setsockopt.xml
index 53694522e..14829085b 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setsockopt.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setsockopt.xml
@@ -46,7 +46,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -63,13 +63,7 @@
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2019, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/settimeofday.xml b/CodeHawk/CHB/bchsummaries/so_functions/settimeofday.xml
index 6df23c7c4..9ca629d8c 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/settimeofday.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/settimeofday.xml
@@ -31,19 +31,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/setuid.xml b/CodeHawk/CHB/bchsummaries/so_functions/setuid.xml
index 5821de90a..da76910ba 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/setuid.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/setuid.xml
@@ -23,19 +23,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/shutdown.xml b/CodeHawk/CHB/bchsummaries/so_functions/shutdown.xml
index 023003263..e59b278fd 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/shutdown.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/shutdown.xml
@@ -29,19 +29,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sigaction.xml b/CodeHawk/CHB/bchsummaries/so_functions/sigaction.xml
index 18b45c045..ef92014e3 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sigaction.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sigaction.xml
@@ -43,19 +43,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sigaddset.xml b/CodeHawk/CHB/bchsummaries/so_functions/sigaddset.xml
index 7945ccb41..213bba29e 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sigaddset.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sigaddset.xml
@@ -30,19 +30,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sigemptyset.xml b/CodeHawk/CHB/bchsummaries/so_functions/sigemptyset.xml
index 56b0d8844..1146810fe 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sigemptyset.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sigemptyset.xml
@@ -22,19 +22,13 @@
       
       int
     
-    
+    
       
       
       
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sigprocmask.xml b/CodeHawk/CHB/bchsummaries/so_functions/sigprocmask.xml
index 10cfc21d8..f5c4ee529 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sigprocmask.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sigprocmask.xml
@@ -43,19 +43,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2020, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/socket.xml b/CodeHawk/CHB/bchsummaries/so_functions/socket.xml
index 9a631853c..dfdc595bf 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/socket.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/socket.xml
@@ -43,19 +43,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2019, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/socketpair.xml b/CodeHawk/CHB/bchsummaries/so_functions/socketpair.xml
index 0e01a2e26..9ba6ef1d6 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/socketpair.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/socketpair.xml
@@ -51,7 +51,7 @@
       
       int
     
-    
+    
       
       
 	
@@ -79,11 +79,6 @@
 	    
 	  
 	
-        
-          
-            
-          
-        
       
     
   
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sscanf.xml b/CodeHawk/CHB/bchsummaries/so_functions/sscanf.xml
index 660e3faba..7150caa75 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/sscanf.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/sscanf.xml
@@ -34,7 +34,7 @@
       
       int
     
-    
+    
       
       
       
@@ -57,13 +57,7 @@
 	  
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
 
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/stat.xml b/CodeHawk/CHB/bchsummaries/so_functions/stat.xml
index c2319cde9..80b29fb1c 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/stat.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/stat.xml
@@ -41,7 +41,7 @@
      
     
    
-   
+   
     
        
     
@@ -49,13 +49,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
   Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/stat64.xml b/CodeHawk/CHB/bchsummaries/so_functions/stat64.xml
index cc90f736c..c6bbf2f08 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/stat64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/stat64.xml
@@ -41,7 +41,7 @@
      
     
    
-   
+   
     
        
     
@@ -49,13 +49,7 @@
     
       
     
-    
-      
-        
-          
-        
-      
-    
+    
    
   
  
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/statfs.xml b/CodeHawk/CHB/bchsummaries/so_functions/statfs.xml
index 4bd37addf..927e658dd 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/statfs.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/statfs.xml
@@ -32,19 +32,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/statfs64.xml b/CodeHawk/CHB/bchsummaries/so_functions/statfs64.xml
index 6eee5e480..8048d7c04 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/statfs64.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/statfs64.xml
@@ -32,19 +32,13 @@
       
       int
     
-    
+    
       
       
       
         
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/strdup.xml b/CodeHawk/CHB/bchsummaries/so_functions/strdup.xml
index cc8d83f9f..55749fc2f 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/strdup.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/strdup.xml
@@ -26,7 +26,7 @@
      
- + @@ -58,13 +58,7 @@ - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/strtoll.xml b/CodeHawk/CHB/bchsummaries/so_functions/strtoll.xml index 02af9f2c1..91c3296c3 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/strtoll.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/strtoll.xml @@ -34,19 +34,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/strtoul.xml b/CodeHawk/CHB/bchsummaries/so_functions/strtoul.xml index 7a536af30..29745b88a 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/strtoul.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/strtoul.xml @@ -34,19 +34,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/strtoull.xml b/CodeHawk/CHB/bchsummaries/so_functions/strtoull.xml index f594f1e04..5772ae2f6 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/strtoull.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/strtoull.xml @@ -34,19 +34,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/sysinfo.xml b/CodeHawk/CHB/bchsummaries/so_functions/sysinfo.xml index 65ca66b98..e05d274d0 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/sysinfo.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/sysinfo.xml @@ -21,17 +21,11 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/system.xml b/CodeHawk/CHB/bchsummaries/so_functions/system.xml index 912fd8030..4b4de97e4 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/system.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/system.xml @@ -28,7 +28,7 @@ int - + @@ -45,13 +45,7 @@ - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/tcflush.xml b/CodeHawk/CHB/bchsummaries/so_functions/tcflush.xml index 0363416d2..64cd83480 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/tcflush.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/tcflush.xml @@ -29,19 +29,13 @@ int - + - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/tcgetattr.xml b/CodeHawk/CHB/bchsummaries/so_functions/tcgetattr.xml index 389979f1c..be97fdf42 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/tcgetattr.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/tcgetattr.xml @@ -31,17 +31,11 @@ int - + - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/tcsetattr.xml b/CodeHawk/CHB/bchsummaries/so_functions/tcsetattr.xml index b7b9d4562..f93fd2928 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/tcsetattr.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/tcsetattr.xml @@ -35,19 +35,13 @@ int - + - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/tempnam.xml b/CodeHawk/CHB/bchsummaries/so_functions/tempnam.xml index 0e0814d17..aff0cd454 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/tempnam.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/tempnam.xml @@ -31,19 +31,13 @@ char - + - - - - - - - + Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/time.xml b/CodeHawk/CHB/bchsummaries/so_functions/time.xml index 66d4baf7e..56a0b0279 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/time.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/time.xml @@ -25,7 +25,7 @@ - + @@ -33,13 +33,7 @@ - - - - - - - + Copyright 2012-2017, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/times.xml b/CodeHawk/CHB/bchsummaries/so_functions/times.xml index f624c5560..1c2e40119 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/times.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/times.xml @@ -22,19 +22,13 @@ clock_t - + - - - - - - - + Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/unlink.xml b/CodeHawk/CHB/bchsummaries/so_functions/unlink.xml index 1cecaca18..9f143571b 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/unlink.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/unlink.xml @@ -21,19 +21,13 @@ int - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/usleep.xml b/CodeHawk/CHB/bchsummaries/so_functions/usleep.xml index 8c67e2044..a315195b8 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/usleep.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/usleep.xml @@ -21,19 +21,13 @@ UINT - + - - - - - - - + diff --git a/CodeHawk/CHB/bchsummaries/so_functions/vfprintf.xml b/CodeHawk/CHB/bchsummaries/so_functions/vfprintf.xml index 4f7d2576c..58b6b795f 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/vfprintf.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/vfprintf.xml @@ -42,7 +42,7 @@ VOID - + @@ -51,13 +51,7 @@ 0 0 - - - - - - - + Copyright 2012-2016, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/wait.xml b/CodeHawk/CHB/bchsummaries/so_functions/wait.xml index 4ca3f7e1e..17de0a0bc 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/wait.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/wait.xml @@ -21,19 +21,13 @@ pid_t - + - - - - - - - + Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/wait4.xml b/CodeHawk/CHB/bchsummaries/so_functions/wait4.xml index af6693f71..d35acf2d9 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/wait4.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/wait4.xml @@ -43,19 +43,13 @@ pid_t - + - - - - - - - + Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/waitpid.xml b/CodeHawk/CHB/bchsummaries/so_functions/waitpid.xml index 4c54e3118..5b96acfe2 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/waitpid.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/waitpid.xml @@ -41,19 +41,13 @@ pid_t - + - - - - - - - + Copyright 2012-2020, Kestrel Technology LLC, Palo Alto, CA 94304 diff --git a/CodeHawk/CHB/bchsummaries/so_functions/write.xml b/CodeHawk/CHB/bchsummaries/so_functions/write.xml index 195c15310..af8541d67 100644 --- a/CodeHawk/CHB/bchsummaries/so_functions/write.xml +++ b/CodeHawk/CHB/bchsummaries/so_functions/write.xml @@ -34,7 +34,7 @@ size_t - +
@@ -77,13 +77,7 @@
 	  
 	
       
-      
-        
-          
-            
-          
-        
-      
+      
     
   
   Copyright 2012-2019, Kestrel Technology LLC, Palo Alto, CA 94304
diff --git a/CodeHawk/CHB/bchsummaries/so_functions/writev.xml b/CodeHawk/CHB/bchsummaries/so_functions/writev.xml
index 876645ad9..506f25521 100644
--- a/CodeHawk/CHB/bchsummaries/so_functions/writev.xml
+++ b/CodeHawk/CHB/bchsummaries/so_functions/writev.xml
@@ -37,7 +37,7 @@
       
       ssize_t
     
-    
+    
       
       
 	
@@ -55,13 +55,7 @@
 	
- - - - - - - +
diff --git a/CodeHawk/CHB/bchsummaries/ws2_32_dll/gethostname.xml b/CodeHawk/CHB/bchsummaries/ws2_32_dll/gethostname.xml index faf6c1826..2f923eff4 100644 --- a/CodeHawk/CHB/bchsummaries/ws2_32_dll/gethostname.xml +++ b/CodeHawk/CHB/bchsummaries/ws2_32_dll/gethostname.xml @@ -38,7 +38,7 @@
- + @@ -59,7 +59,6 @@ -