Stéphane Glondu pushed to branch debian/sid at Debian OCaml Maintainers / ocaml
Commits:
ac328659 by Stéphane Glondu at 2026-11-28T07:47:51+01:00
Align atoms and weak_dummy on sizeof(value)
- - - - -
90ffe876 by Stéphane Glondu at 2026-11-28T07:48:05+01:00
Update changelog and prepare upload to unstable
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/Align-atoms-and-weak_dummy-on-sizeof-value.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+ocaml (5.5.2-2) unstable; urgency=medium
+
+ * Align atoms and weak_dummy on sizeof(value)
+
+ -- Stéphane Glondu <glon…@debian.org> Sat, 28 Nov 2026 07:47:53 +0100
+
ocaml (5.5.2-1) unstable; urgency=medium
* Upload to unstable
=====================================
debian/patches/Align-atoms-and-weak_dummy-on-sizeof-value.patch
=====================================
@@ -0,0 +1,38 @@
+From: =?utf-8?q?St=C3=A9phane_Glondu?= <glon…@debian.org>
+Date: Sat, 28 Nov 2026 07:17:11 +0100
+Subject: Align atoms and weak_dummy on sizeof(value)
+
+This is no guaranteed on m68k, where 32-bit values are 16-bit aligned.
+
+Bug: https://github.com/ocaml/ocaml/issues/15428
+---
+ runtime/shared_heap.c | 2 +-
+ runtime/weak.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/runtime/shared_heap.c b/runtime/shared_heap.c
+index 0894441..6e78456 100644
+--- a/runtime/shared_heap.c
++++ b/runtime/shared_heap.c
+@@ -873,7 +873,7 @@ void caml_accum_orphan_heap_stats(struct heap_stats* acc)
+
+
+ /* Atoms */
+-static const header_t atoms[256] = {
++static CAMLalign(sizeof(value)) const header_t atoms[256] = {
+ #define A(i) Make_header(0, i, NOT_MARKABLE)
+ A(0),A(1),A(2),A(3),A(4),A(5),A(6),A(7),A(8),A(9),A(10),
+ A(11),A(12),A(13),A(14),A(15),A(16),A(17),A(18),A(19),A(20),
+diff --git a/runtime/weak.c b/runtime/weak.c
+index 279077e..e1c165a 100644
+--- a/runtime/weak.c
++++ b/runtime/weak.c
+@@ -30,7 +30,7 @@
+ #include "caml/weak.h"
+ #include "caml/platform.h"
+
+-static value weak_dummy[] =
++static CAMLalign(sizeof(value)) value weak_dummy[] =
+ {(value)Make_header(0,Abstract_tag, NOT_MARKABLE),
+ Val_unit,
+ (value)Make_header(0,Abstract_tag, NOT_MARKABLE),
=====================================
debian/patches/series
=====================================
@@ -8,3 +8,4 @@ Print-.cmi-flags-in-objinfo.patch
Avoid-static-assertion-failure-on-m68k.patch
Define-PATH_MAX-if-undefined-e.g.-on-Hurd.patch
driver-pparse-support-source-files-larger-that-max_string.patch
+Align-atoms-and-weak_dummy-on-sizeof-value.patch
View it on GitLab: https://salsa.debian.org/ocaml-team/ocaml/-/compare/dffcce083b1ebf8ee7424f621d82b9b8c4f7695f...90ffe87628017d03228285508196ce8b23499c06
--
View it on GitLab: https://salsa.debian.org/ocaml-team/ocaml/-/compare/dffcce083b1ebf8ee7424f621d82b9b8c4f7695f...90ffe87628017d03228285508196ce8b23499c06
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help