Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 98f51c91 authored by MARCHE Claude's avatar MARCHE Claude Committed by Sylvain Dailler
Browse files

fixed memory access bug in why3server

(cherry picked from commit 963190dc)
parent 00f20638
...@@ -109,11 +109,20 @@ let connect_internal () = ...@@ -109,11 +109,20 @@ let connect_internal () =
Filename.temp_file "why3server" "sock" Filename.temp_file "why3server" "sock"
in in
let exec = Filename.concat Config.libdir "why3server" in let exec = Filename.concat Config.libdir "why3server" in
let pid = Unix.create_process exec let pid =
(* use this version for debugging the C code
Unix.create_process "valgrind"
[|"/usr/bin/valgrind";exec; "--socket"; socket_name;
"--single-client";
"-j"; string_of_int !max_running_provers|]
Unix.stdin Unix.stdout Unix.stderr
*)
Unix.create_process exec
[|exec; "--socket"; socket_name; [|exec; "--socket"; socket_name;
"--single-client"; "--single-client";
"-j"; string_of_int !max_running_provers|] "-j"; string_of_int !max_running_provers|]
Unix.stdin Unix.stdout Unix.stderr in Unix.stdin Unix.stdout Unix.stderr
in
Unix.chdir cwd; Unix.chdir cwd;
(* sleep before connecting, or the server will not be ready yet *) (* sleep before connecting, or the server will not be ready yet *)
let rec try_connect n d = let rec try_connect n d =
......
...@@ -77,7 +77,7 @@ void parse_options(int argc, char **argv) { ...@@ -77,7 +77,7 @@ void parse_options(int argc, char **argv) {
} }
} }
if (optind < argc) { if (optind < argc) {
printf("extra arguments, stopping\n"); printf("extra arguments, stopping [opt_index=%d,argc=%d]\n",optind,argc);
exit(1); exit(1);
} }
if (basename == NULL) { if (basename == NULL) {
...@@ -85,4 +85,3 @@ void parse_options(int argc, char **argv) { ...@@ -85,4 +85,3 @@ void parse_options(int argc, char **argv) {
exit(1); exit(1);
} }
} }
...@@ -79,7 +79,7 @@ prequest parse_request(char* str_req, int len, int key) { ...@@ -79,7 +79,7 @@ prequest parse_request(char* str_req, int len, int key) {
parallel = parallel_arg; parallel = parallel_arg;
} }
} }
if (strncmp(tmp, "interrupt", pos) == 0) { else if (strncmp(tmp, "interrupt", pos) == 0) {
free(tmp); free(tmp);
req = (prequest) malloc(sizeof(request)); req = (prequest) malloc(sizeof(request));
req->key = key; req->key = key;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment