Fix up comments & messages, add Release Notes

This commit is contained in:
Andrew Johnson
2021-02-27 16:45:12 -06:00
parent bee00658ae
commit 08eaea64d2
3 changed files with 17 additions and 3 deletions

View File

@@ -18,6 +18,20 @@ should also be read to understand what has changed since earlier releases.
<!-- Insert new items immediately below here ... -->
### Prevent default DTYPs from changing
[Kay Kasemir reported](https://bugs.launchpad.net/epics-base/+bug/1908305) that
it is possible to change the Base record type's default DTYP if a `device()`
entry is seen before the `recordtype()` definition to which it refers. The
default DTYP is the first device loaded, which is normally the `Soft Channel`
support from Base. A warning was being displayed by dbdExpand when a `device()`
entry was see first, but that was easily missed.
The DBD file parser in dbdExpand.pl has now been modified to make this an error,
although the registerRecordDeviceDriver.pl script will still accept `device()`
entries without having their `recordtype()` loaded since this is necessary to
compile device supports as loadable modules.
### Priority inversion safe posix mutexes

View File

@@ -103,8 +103,8 @@ sub ParseDBD {
unquote($1, $2, $3, $4);
my $rtyp = $dbd->recordtype($record_type);
if (!defined $rtyp) {
my $msg = "Device '$choice' defined for unknown record type '$record_type'.";
dieContext($msg, "DBD files must be added in the correct order.")
my $msg = "Device '$choice' refers to unknown record type '$record_type'.";
dieContext($msg, "DBD files must be combined in the correct order.")
unless $allowAutoDeclarations;
warn "$msg\nRecord type '$record_type' declared.\n";
$rtyp = DBD::Recordtype->new($record_type);

View File

@@ -31,7 +31,7 @@ my @path = map { split /[:;]/ } @opt_I; # FIXME: Broken on Win32?
my ($file, $subname, $bldTop) = @ARGV;
# Permit auto-declaration of record types for building runtime-loadable modules
# Auto-declaration of record types is needed to build loadable modules
$DBD::Parser::allowAutoDeclarations = 1;
my $dbd = DBD->new();