all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#46916: 28.0.50; pure_alloc(10424, ...) fails badly when pure space is exhausted
@ 2021-03-04 12:24 Pip Cet
  2021-03-04 12:44 ` Pip Cet
  0 siblings, 1 reply; 10+ messages in thread
From: Pip Cet @ 2021-03-04 12:24 UTC (permalink / raw)
  To: 46916

Pure space should be removed. But until it is, it shouldn't exhaust
all virtual memory, crashing the machines of the unwary ones who tried
to build emacs without a ulimit...

The problem I ran into was that the native-comp branch calls Fpurecopy
on comp_u->data_vec. In my case, pure space was already exhausted and
data_vec had 1302 elements.

That caused purecopy() to call pure_alloc with a size argument of
10424. pure_alloc allocated another 10000 bytes of fake pure space,
found out those weren't enough, so it allocated another 10000 bytes of
fake pure space, which weren't enough, etc., until the process started
swapping.

I'm not sure who's the culprit here: the native-comp branch tries to
purecopy a large vector, which is a problem; purecopy() saw that
request and passed it on to pure_alloc(), rather than returning the
impure vector because it was too large. And pure_alloc() certainly
should fail more gracefully than it did (there's an eassert() to
prevent this situation, but that should be unconditionally compiled
instead).

I was going to write a message to emacs-devel (I'd started before
hitting this bug) proposing to remove pure-space now, but I think it's
fair to have a separate bug report if we decide to keep pure space
after all.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-05  7:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-04 12:24 bug#46916: 28.0.50; pure_alloc(10424, ...) fails badly when pure space is exhausted Pip Cet
2021-03-04 12:44 ` Pip Cet
2021-03-04 14:15   ` Eli Zaretskii
2021-10-31  2:56     ` Stefan Kangas
2021-10-31  7:13       ` Eli Zaretskii
2021-10-31  9:41       ` Pip Cet
2021-10-31 11:29         ` Eli Zaretskii
2021-10-31 14:02         ` Stefan Kangas
2021-10-31 14:23           ` Eli Zaretskii
2021-11-05  7:11             ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.