]> xenbits.xensource.com Git - xen.git/commit
ocaml/xenctrl: Make failwith_xc() thread safe
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Jan 2015 17:55:32 +0000 (17:55 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 23 Jun 2015 10:52:44 +0000 (11:52 +0100)
commit9702e084d09550495c2e71f2639c1c2c43aeaf63
tree516a3b3360066b67ad40266ee2481751364c8cbc
parent10a95535b0dcde7daa3402b92f3c8d4494781c28
ocaml/xenctrl: Make failwith_xc() thread safe

The static error_str[] buffer is not thread-safe, and 1024 bytes is
unreasonably large.  Reduce to 256 bytes (which is still much larger than any
current use), and move it to being a stack variable.

Also, propagate the Noreturn attribute from caml_raise_with_string().

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Dave Scott <Dave.Scott@eu.citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: David Scott <dave.scott@citrix.com>
(cherry picked from commit c8945d51613450c19e0898b1b3056c90f4929179)
(cherry picked from commit 032673c8836e28d9e291e0d02235001c41aedaab)
tools/ocaml/libs/xc/xenctrl_stubs.c