[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --with-native-compilation build failure on 32-bit systems

From: Andrea Corallo
Subject: Re: --with-native-compilation build failure on 32-bit systems
Date: Thu, 18 Aug 2022 14:49:19 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> - I suspect there's some good reason I'm not aware of why we don't
>>>   eb539e92e9 at all (this is not necessary to fix the reported issue
>>>   tho).
>> Like I said earlier, I always thought that this problem doesn't affect
>> the pdumper builds.  Perhaps that's not true with native-compilation?
> I can't see any good reason not to warn about purespace overflow,
> regardless if it leads to misbehavior or not: we clearly do want to size
> the purespace to avoid overflow.

I agree.

And I think we'd better to install also (other than my other suggested
patch) the attached.  This to warn not only at the end when dumping, but
also in the moment the overflow happens.  This helps debugging in case
of a crash or analyzing the dynamic of an issue.


>From 89e034a7acef12ad187b95a8b45970c89fdc9e0b Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
Date: Thu, 18 Aug 2022 16:41:26 +0200
Subject: [PATCH] * src/alloc.c (pure_alloc): Warn for pure space overflow

 src/alloc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/alloc.c b/src/alloc.c
index 2ffee9f729..34bedac36b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5314,6 +5314,7 @@ valid_lisp_object_p (Lisp_Object obj)
 pure_alloc (size_t size, int type)
   void *result;
+  static bool pure_overflow_warned = false;
   if (type >= 0)
@@ -5338,6 +5339,12 @@ pure_alloc (size_t size, int type)
   if (pure_bytes_used <= pure_size)
     return result;
+  if (!pure_overflow_warned)
+    {
+      message ("Pure Lisp storage overflowed");
+      pure_overflow_warned = true;
+    }
   /* Don't allocate a large amount here,
      because it might get mmap'd and then its address
      might not be usable.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]