Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize local roots with Val_unit to fix segfault #112

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mlapronidl/apron_caml.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ value camlidl_apron_lincons0_c2ml(ap_lincons0_t* cons)
{
value vres;
value _v[3];
_v[0] = _v[1] = _v[2] = 0;
_v[0] = _v[1] = _v[2] = Val_unit;

Begin_roots_block(_v, 3)
_v[0] = camlidl_apron_linexpr0_ptr_c2ml(&cons->linexpr0);
Expand Down Expand Up @@ -519,7 +519,7 @@ value camlidl_apron_policy_optr_c2ml(ap_policy_optr* p)
if (p==NULL){
return Val_int(0);
} else {
value v,v2=0;
value v,v2 = Val_unit;
Begin_roots1(v2);
v2 = camlidl_apron_policy_ptr_c2ml(p);
v = caml_alloc_small(1,0);
Expand Down
2 changes: 1 addition & 1 deletion mlapronidl/tcons0.idl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ value camlidl_apron_tcons0_c2ml(ap_tcons0_t* cons)\n\
{\n\
value vres;\n\
value _v[3];\n\
_v[0] = _v[1] = _v[2] = 0;\n\
_v[0] = _v[1] = _v[2] = Val_unit;\n\
\n\
Begin_roots_block(_v, 3)\n\
_v[0] = camlidl_apron_texpr0_ptr_c2ml(&cons->texpr0);\n\
Expand Down