From 09fab352b0ea8e96d5341c5807b3aacee3c7bfc7 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Mon, 13 Apr 2015 17:13:09 +0200 Subject: [PATCH 1/8] dbstatic: raise link field length limit to 256 by bumping internal buffer size --- documentation/RELEASE_NOTES.html | 7 +++++++ src/ioc/dbStatic/dbStaticLib.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index a901b5190..76f7a824a 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -14,6 +14,13 @@

Changes between 3.15.1 and 3.15.2

+

Raised limit on link field length in database files

+ +

The length of INP/OUT link fields in database files was limited to 79 chars +by an internal buffer size in the db file parser. This limitation will go away +completely in 3.16, and has been statically raised to 255 chars for the 3.15 +series.

+

aoRecord raw conversion overflows

The ao record type now checks converted raw values and limits them to the diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index dfbf3ab14..4f6990cfb 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -2087,7 +2087,7 @@ long dbPutString(DBENTRY *pdbentry,const char *pstring) case DBF_OUTLINK: case DBF_FWDLINK: { DBLINK *plink; - char string[80]; + char string[256]; char *pstr = string; if (!pfield) From 76205e5c5885750c36e5604810a5e856e64b7122 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 13 Apr 2015 10:36:13 -0500 Subject: [PATCH 2/8] Add podRemove.pl script Use this to generate .dbd files from .dbd.pod files so installed *Record.dbd files don't have the dbdCommon.dbd file expanded out. Fixes lp:1417428 --- configure/RULES.Db | 9 ++++---- src/tools/Makefile | 1 + src/tools/podRemove.pl | 49 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 src/tools/podRemove.pl diff --git a/configure/RULES.Db b/configure/RULES.Db index 63b06dfed..b45e37049 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -239,8 +239,7 @@ menu%.h$(DEP): ../menu%.dbd %.dbd$(DEP): %.dbd.pod @$(RM) $@ - @$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@ - @echo "$(COMMONDEP_TARGET): ../Makefile" >> $@ + @echo "$(COMMONDEP_TARGET): ../Makefile" > $@ %.dbd$(DEP): %Include.dbd @$(RM) $@ @@ -281,6 +280,8 @@ menu%.h$(DEP): ../menu%.dbd @$(RM) $@ @$(ACFDEPENDS_CMD) +.PRECIOUS: %$(DEP) + ##################################################### CapFast filter $(COMMON_DIR)/%.edf: ../%.sch $(DEPSCHS) @@ -370,7 +371,7 @@ $(COMMON_DIR)/bpt%.dbd: bpt%.data $(COMMON_DIR)/%.dbd: %.dbd.pod @$(RM) $(notdir $@) - $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $< + $(PERL) $(TOOLS)/podRemove.pl -o $(notdir $@) $< @$(MV) $(notdir $@) $@ $(COMMON_DIR)/%.dbd: %Include.dbd @@ -422,7 +423,7 @@ $$(INSTALL_DBD)/$$(notdir $(1)) : $(1) endef $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file)))) -.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%Include.dbd +.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%.dbd ##################################################### HTML files diff --git a/src/tools/Makefile b/src/tools/Makefile index 54115bc79..0e66e49c9 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -51,6 +51,7 @@ PERL_SCRIPTS += dbdToRecordtypeH.pl PERL_SCRIPTS += dbdExpand.pl PERL_SCRIPTS += dbdToHtml.pl PERL_SCRIPTS += podToHtml.pl +PERL_SCRIPTS += podRemove.pl PERL_SCRIPTS += registerRecordDeviceDriver.pl HTMLS = style.css diff --git a/src/tools/podRemove.pl b/src/tools/podRemove.pl new file mode 100644 index 000000000..c44f16a3d --- /dev/null +++ b/src/tools/podRemove.pl @@ -0,0 +1,49 @@ +#!/usr/bin/env perl +#************************************************************************* +# Copyright (c) 2015 UChicago Argonne LLC, as Operator of Argonne +# National Laboratory. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +# $Id$ + +use strict; +use warnings; + +use Getopt::Std; + +our ($opt_o); + +$Getopt::Std::OUTPUT_HELP_VERSION = 1; +&HELP_MESSAGE if !getopts('o:') || @ARGV != 1; + +my $infile = shift @ARGV; + +if (!$opt_o) { + ($opt_o = $infile) =~ s/\.pod$//; + $opt_o =~ s/^.*\///; +} + +open my $inp, '<', $infile or + die "podRemove.pl: Can't open $infile: $!\n"; +open my $out, '>', $opt_o or + die "podRemove.pl: Can't create $opt_o: $!\n"; + +my $inPod = 0; +while (<$inp>) { + if (m/\A=[a-zA-Z]/) { + $inPod = !m/\A=cut/; + } + else { + print $out $_ unless $inPod; + } +} + +close $out; +close $inp; + +sub HELP_MESSAGE { + print STDERR "Usage: podRemove.pl [-o file] file.pod\n"; + exit 2; +} From 5c3032059c4fd7c79a1a945b0bbc81ad613bd8e8 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 14 Apr 2015 10:14:29 +0200 Subject: [PATCH 3/8] configure: update CONFIG_BASE_VERSION for 3.15.2-pre1 --- configure/CONFIG_BASE_VERSION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure/CONFIG_BASE_VERSION b/configure/CONFIG_BASE_VERSION index a781a5260..89279f416 100644 --- a/configure/CONFIG_BASE_VERSION +++ b/configure/CONFIG_BASE_VERSION @@ -29,15 +29,15 @@ EPICS_VERSION = 3 EPICS_REVISION = 15 # EPICS_MODIFICATION must be a number >=0 and <256 -EPICS_MODIFICATION = 1 +EPICS_MODIFICATION = 2 # EPICS_PATCH_LEVEL must be a number (win32 resource file requirement) # Not included if zero EPICS_PATCH_LEVEL = 0 # This will end in -DEV between official releases -EPICS_DEV_SNAPSHOT=-DEV -#EPICS_DEV_SNAPSHOT=-pre1 +#EPICS_DEV_SNAPSHOT=-DEV +EPICS_DEV_SNAPSHOT=-pre1 #EPICS_DEV_SNAPSHOT=-pre1-DEV #EPICS_DEV_SNAPSHOT=-pre2 #EPICS_DEV_SNAPSHOT=-pre2-DEV From f168a0f6121193275684c8175c6286da4eebe09e Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 14 Apr 2015 11:04:27 +0200 Subject: [PATCH 4/8] configure: set version snapshot to -pre1-DEV --- configure/CONFIG_BASE_VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure/CONFIG_BASE_VERSION b/configure/CONFIG_BASE_VERSION index 89279f416..2b19042c1 100644 --- a/configure/CONFIG_BASE_VERSION +++ b/configure/CONFIG_BASE_VERSION @@ -37,8 +37,8 @@ EPICS_PATCH_LEVEL = 0 # This will end in -DEV between official releases #EPICS_DEV_SNAPSHOT=-DEV -EPICS_DEV_SNAPSHOT=-pre1 -#EPICS_DEV_SNAPSHOT=-pre1-DEV +#EPICS_DEV_SNAPSHOT=-pre1 +EPICS_DEV_SNAPSHOT=-pre1-DEV #EPICS_DEV_SNAPSHOT=-pre2 #EPICS_DEV_SNAPSHOT=-pre2-DEV #EPICS_DEV_SNAPSHOT=-rc1 From a6d3c4f79280b4ab421e44f8ac64f08db337c4cf Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 14 Apr 2015 17:57:10 -0500 Subject: [PATCH 5/8] Document -D option to msi --- src/ioc/dbtemplate/msi.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ioc/dbtemplate/msi.html b/src/ioc/dbtemplate/msi.html index b7e4e9e9e..ff4341ead 100644 --- a/src/ioc/dbtemplate/msi.html +++ b/src/ioc/dbtemplate/msi.html @@ -24,7 +24,7 @@ accepted by the EPICS IOC's dbLoadTemplate command.

Command Syntax:

-
msi -V -g -ooutfile -Idir -Msubs -Ssubfile template
+
msi -V -g -D -ooutfile -Idir -Msubs -Ssubfile template

All parameters are optional. The -o, -I, -M, and -S switches may be separated from their associated value string by spaces if desired. Output will @@ -46,6 +46,13 @@ be written to stdout unless the -o option is given.

this was the behavior of previous versions of msi, but it does not follow common scoping rules and is discouraged. +
-D
+
Output dependency information suitable for including by a Makefile to + stdout instead of performing the macro substitutions. The -o option + must be given to specify the target name for the dependency rules. Other + options should be given exactly as will be used in the macro substitution + process.
+
-o file
Output will be written to the specifed file rather than to the standard output.
From 874087f45431a01821a721130be032bb4124a005 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 14 Apr 2015 17:58:33 -0500 Subject: [PATCH 6/8] Update some version numbers in documentation --- documentation/README.1st | 2 +- documentation/README.html | 2 +- src/ca/client/perl/CA.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/README.1st b/documentation/README.1st index effafe36d..48c52565b 100644 --- a/documentation/README.1st +++ b/documentation/README.1st @@ -1,6 +1,6 @@ Installation Instructions - EPICS Base Release 3.15.1 + EPICS Base Release 3.15.2 -------------------------------------------------------------------------- diff --git a/documentation/README.html b/documentation/README.html index f5d51d7b0..236f8f5f8 100644 --- a/documentation/README.html +++ b/documentation/README.html @@ -9,7 +9,7 @@

Installation Instructions

-

EPICS Base Release 3.15.1


+

EPICS Base Release 3.15.2



Table of Contents

diff --git a/src/ca/client/perl/CA.pm b/src/ca/client/perl/CA.pm index a7daaf21b..22944172a 100644 --- a/src/ca/client/perl/CA.pm +++ b/src/ca/client/perl/CA.pm @@ -652,7 +652,7 @@ not follow this pattern, but are still printable strings. =item [1] R3.15 Channel Access Reference Manual by Jeffrey O. Hill -L +L =back From da93312b7916d1642862660691b173ffc4262aed Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 16 Apr 2015 10:55:14 +0200 Subject: [PATCH 7/8] configure: fix Windows builds - don't use static link to create DLL stub --- configure/RULES_BUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 854068537..a0f9537fe 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -260,7 +260,7 @@ YACCOPT ?= $($*_YACCOPT) $(LIBNAME) $(TESTLIBNAME): $(LIBRARY_OBJS) -$(LIBNAME) $(TESTLIBNAME): $(LIB_PREFIX)%$(LIB_SUFFIX): +$(filter-out $(DLLSTUB_LIBNAME) $(TESTDLLSTUB_LIBNAME), $(LIBNAME) $(TESTLIBNAME)): $(LIB_PREFIX)%$(LIB_SUFFIX): @$(RM) $@ $(ARCMD) ifneq ($(strip $(RANLIB)),) @@ -270,13 +270,13 @@ endif # RANLIB $(SHRLIBNAME) $(DLLSTUB_LIBNAME) $(TESTSHRLIBNAME) $(TESTDLLSTUB_LIBNAME): \ $(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS) -$(DLLSTUB_LIBNAME): $(SHRLIBNAME) +$(DLLSTUB_LIBNAME): $(SHRLIBNAME); $(SHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX): @$(RM) $@ $(LINK.shrlib) $(MT_DLL_COMMAND) -$(TESTDLLSTUB_LIBNAME): $(TESTSHRLIBNAME) +$(TESTDLLSTUB_LIBNAME): $(TESTSHRLIBNAME); $(TESTSHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX): @$(RM) $@ $(LINK.shrlib) From bcf47ac6630f34db4a303f00f36e6267d233aa52 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 16 Apr 2015 14:05:33 +0200 Subject: [PATCH 8/8] gdd: fix 64 bit warnings using explicit casts for strlen() results --- src/ca/legacy/gdd/aitHelpers.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ca/legacy/gdd/aitHelpers.h b/src/ca/legacy/gdd/aitHelpers.h index a24ba4181..bfd4069f1 100644 --- a/src/ca/legacy/gdd/aitHelpers.h +++ b/src/ca/legacy/gdd/aitHelpers.h @@ -323,7 +323,7 @@ inline int aitString::installBuf(const char* pString, unsigned strLengthIn, unsi inline int aitString::installBuf(const char* pString) { - unsigned strLengthIn = strlen(pString); + unsigned strLengthIn = (unsigned) strlen(pString); return this->installBuf(pString, strLengthIn, strLengthIn+1u); } @@ -350,7 +350,7 @@ inline int aitString::installConstBuf(const char* pString, unsigned strLengthIn, inline int aitString::installConstBuf(const char* pString) { - unsigned strLengthIn = strlen(pString); + unsigned strLengthIn = (unsigned) strlen(pString); return this->installConstBuf(pString, strLengthIn, strLengthIn+1u); } @@ -378,7 +378,7 @@ inline int aitString::installConstImortalBuf(const char* pString, inline int aitString::installConstImortalBuf(const char* pString) { - unsigned strLengthIn = strlen(pString); + unsigned strLengthIn = (unsigned) strlen(pString); return this->installConstImortalBuf(pString, strLengthIn, strLengthIn+1u); } @@ -396,7 +396,7 @@ inline int aitString::copy(const char* pString, unsigned stringLength) inline int aitString::copy(const char* p) { - return this->copy(p, strlen(p)); + return this->copy(p, (unsigned) strlen(p)); } inline int aitString::copy(const aitString* p) @@ -436,7 +436,7 @@ inline aitString::aitString(void) inline aitString::aitString(const char* p, aitStrType typeIn) { - unsigned strLengthIn = strlen(p); + unsigned strLengthIn = (unsigned) strlen(p); this->init(p, typeIn, strLengthIn, strLengthIn+1u); }