Re: [PATCH] xenctrl_stubs.c: fix NULL dereference

2023-08-03 Thread Andrew Cooper
On 03/08/2023 11:15 am, Jan Beulich wrote: > On 13.07.2023 10:30, Edwin Török wrote: >> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c >> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c >> @@ -832,7 +832,7 @@ CAMLprim value physinfo_arch_caps(const xc_physinfo_t >> *info) >> >> tag = 1; /* tag x86 */

Re: [PATCH] xenctrl_stubs.c: fix NULL dereference

2023-08-03 Thread Jan Beulich
On 13.07.2023 10:30, Edwin Török wrote: > --- a/tools/ocaml/libs/xc/xenctrl_stubs.c > +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c > @@ -832,7 +832,7 @@ CAMLprim value physinfo_arch_caps(const xc_physinfo_t > *info) > > tag = 1; /* tag x86 */ > > - arch_obj = Tag_cons; > + arch_obj

Re: [PATCH] xenctrl_stubs.c: fix NULL dereference

2023-07-13 Thread Christian Lindig
> On 13 Jul 2023, at 09:30, Edwin Török wrote: > > From: Edwin Török > > `Tag_cons` is `0` and is meant to be used as the tag argument for > `caml_alloc`/`caml_alloc_small` > when constructing a non-empty list. > The empty list is `Val_emptylist` instead (which is really just `Val_int(0)`).

[PATCH] xenctrl_stubs.c: fix NULL dereference

2023-07-13 Thread Edwin Török
From: Edwin Török `Tag_cons` is `0` and is meant to be used as the tag argument for `caml_alloc`/`caml_alloc_small` when constructing a non-empty list. The empty list is `Val_emptylist` instead (which is really just `Val_int(0)`). Assigning `0` to a list value like this is equivalent to assigni