Subject: bug#41983: Reference Manual: Open Question About Magic Metaness of Vtables

From: Sebastian Miele <[email-masked]>
Date: Sun, 21 Jun 2020 16:27:43 +0200

I am on the current master branch. After reading section 6.6.18.4
(Meta-Vtables) of the reference manual there remains an open question.

A structure X made from a meta-vtable becomes a meta-vtable if
standard-vtable-fields is a prefix of the layout in X's field 0. And if
X is a meta-vtable, every structure with X as a vtable must have a valid
layout in field 0.

Suppose the following: standard-vtable-fields accidentally is a prefix
of some valid layout string l. Then

  (define v (make-vtable l))
  (make-struct/no-tail v 'a)

raises an exception, because 'a is not a valid layout. But v may not be
intended to be a meta-vtable, just a vtable. The reference manual does
mention why that can not happen, or why is it accepted that it may
happen.