aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPip Cet2024-07-22 14:47:47 +0000
committerPip Cet2024-07-22 15:05:53 +0000
commitf330b6876ae482bc2780bb5d024ad6864a13d61c (patch)
treec7d6064cf37e0bb07046559b29f2cbce765ac7f6 /src/alloc.c
parentf4a41b4c5d082f85a14d7b2dbe44f290d3ceda0b (diff)
downloademacs-f330b6876ae482bc2780bb5d024ad6864a13d61c.tar.gz
emacs-f330b6876ae482bc2780bb5d024ad6864a13d61c.zip
Correct for some incorrect pseudoheader sizes in igc.c
Arguably, these are bugs that should be fixed in lisp.h (along with the comment describing the pvec header for subrs) and thread.c, by initializing pseudovector headers so they actually describe the pseudovectors in static memory, but the traditional GC doesn't care. * src/alloc.c (make_pure_bignum): Call 'igc_init_header' after setting the pvec header, not before. * src/igc.c (gc_init_header): Catch PVEC_SUBR and PVEC_THREAD, which sometimes have incorrect headers * src/lisp.h (DEFUN) [HAVE_MPS]: Set pseudovector flag for subrs.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 34d4850ca32..320a5adaf0b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6128,8 +6128,8 @@ make_pure_bignum (Lisp_Object value)
6128 mp_size_t new_size; 6128 mp_size_t new_size;
6129 6129
6130 struct Lisp_Bignum *b = pure_alloc (sizeof *b, Lisp_Vectorlike); 6130 struct Lisp_Bignum *b = pure_alloc (sizeof *b, Lisp_Vectorlike);
6131 gc_init_header (&b->header.gc_header, IGC_OBJ_VECTOR);
6132 XSETPVECTYPESIZE (b, PVEC_BIGNUM, 0, VECSIZE (struct Lisp_Bignum)); 6131 XSETPVECTYPESIZE (b, PVEC_BIGNUM, 0, VECSIZE (struct Lisp_Bignum));
6132 gc_init_header (&b->header.gc_header, IGC_OBJ_VECTOR);
6133 6133
6134 int limb_alignment = alignof (mp_limb_t); 6134 int limb_alignment = alignof (mp_limb_t);
6135 pure_limbs = pure_alloc (nbytes, - limb_alignment); 6135 pure_limbs = pure_alloc (nbytes, - limb_alignment);