]> git.eshelyaron.com Git - emacs.git/commitdiff
Mark atimer allocation as ambiguous root
authorJeff Walsh <fejfighter@gmail.com>
Tue, 5 Nov 2024 12:09:56 +0000 (23:09 +1100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 14:54:18 +0000 (15:54 +0100)
* src/atimer.c (start_atimer): Time could be passed a lisp object for
data, we should allocate this as an ambiguous root

(cherry picked from commit c42b90b21a4efb3c5a8ebc6e3bd6be2908d1f2ac)

src/atimer.c

index 8253ae3a166cde3b2b18b54a311b3c7540833c62..5bd282a310d897745886bb21d2388c8fedfcc962 100644 (file)
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
+#include "igc.h"
 
 #ifdef WINDOWSNT
 #define raise(s) w32_raise(s)
@@ -132,7 +133,13 @@ start_atimer (enum atimer_type type, struct timespec timestamp,
       free_atimers = t->next;
     }
   else
-    t = xmalloc (sizeof *t);
+    {
+#ifdef HAVE_MPS
+      t = igc_xzalloc_ambig (sizeof *t);
+#else
+      t = xmalloc (sizeof *t);
+#endif
+    }
 
   /* Fill the atimer structure.  */
   memset (t, 0, sizeof *t);