From f840659e84d16641ca4d821a5928fc8bd2a5c654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 16 Aug 2017 16:09:05 +0200 Subject: beam_makeops: Add an additional sanity check If a type has a size in %arg_size, it should also have a defined pattern in %bit_type. --- erts/emulator/utils/beam_makeops | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'erts/emulator/utils/beam_makeops') diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index c3ff7bf31f..9775a01b89 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -228,6 +228,12 @@ $match_engine_ops{'TOP_fail'} = 1; sanity("tag '$tag': primitive tags must be named with lowercase letters") unless $tag =~ /^[a-z]$/; } + + foreach my $tag (keys %arg_size) { + defined $type_bit{$tag} or + sanity("the tag '$tag' has a size in %arg_size, " . + "but has no defined bit pattern"); + } } # -- cgit v1.2.3