The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

runtime/array.c: blitting from flat to non-flat is not supported (#13102)


Reported-by: Olivier Nicole <olivier@chnik.fr>
Reviewed-by: Olivier Nicole <olivier@chnik.fr>
Reviewed-by: Xavier Leroy <xavier.leroy@college-de-france.fr>

authored by

Gabriel Scherer and committed by
GitHub
d87e21fb 57255a07

+10
+10
runtime/array.c
··· 371 371 CAMLprim value caml_floatarray_blit(value a1, value ofs1, value a2, value ofs2, 372 372 value n) 373 373 { 374 + if (Long_val(n) == 0) return Val_unit; 375 + /* Note: size-0 floatarrays do not have Double_array_tag, 376 + but only size-0 blits are possible on them, so they 377 + do not reach this point. */ 378 + CAMLassert (Tag_val(a1) == Double_array_tag); 379 + CAMLassert (Tag_val(a2) == Double_array_tag); 374 380 /* See memory model [MM] notes in memory.c */ 375 381 atomic_thread_fence(memory_order_acquire); 376 382 memmove((double *)a2 + Long_val(ofs2), ··· 389 395 if (Tag_val(a2) == Double_array_tag) 390 396 return caml_floatarray_blit(a1, ofs1, a2, ofs2, n); 391 397 #endif 398 + if (Long_val(n) == 0) 399 + /* See comment on size-0 floatarrays in [caml_floatarray_blit]. */ 400 + return Val_unit; 401 + CAMLassert (Tag_val(a1) != Double_array_tag); 392 402 CAMLassert (Tag_val(a2) != Double_array_tag); 393 403 if (Is_young(a2)) { 394 404 /* Arrays of values, destination is in young generation.