Subject: Re: bug#76705: 31.0.50; igc: crash

From: Gerd Möllmann <[email-masked]>
Date: Thu, 06 Mar 2025 08:52:10 +0100

Helmut Eller <[email-masked]> writes:

> For me, this code 
> ;; -*- lexical-binding: t -*-
>
> (defun test ()
>   (let* ((npages 120000)
> 	 (pages (make-vector npages nil)))
>     (dotimes (i npages)
>       (aset pages i (make-vector (/ 4096 2) 0)))
>     (message "nmaps: %s" 
> 	     (shell-command-to-string
> 	      (format "wc -l /proc/%d/maps" (emacs-pid))))
>     (dotimes (i npages)
>       (when (zerop (% i 2))
> 	(let ((page (aref pages i)))
> 	  (aset page 0 1))))))
>
> crashes with:
> protix.c:117: Emacs fatal error: assertion failed: unreachable code

FWIW, no problem on macOS with the program above (page size = 16K). I
drove it up to using ca. 16G memory which went down to normal again
after igc-collect. Alas, I don't know how to see details of the VM.