diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 4958fb27f..8534b27fe 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -14,6 +14,11 @@ +

Fixed crash loading record instance of unknown type

+ +

Fixed segfault when dbLoadRecords tried to load a record of a type that was +not defined in its DBD files.

+

Hex literal support in epicStrtod()

Some OS implementations of the standard C library routine strtod() do not diff --git a/src/dbStatic/dbLexRoutines.c b/src/dbStatic/dbLexRoutines.c index 9932dceae..efa8501df 100644 --- a/src/dbStatic/dbLexRoutines.c +++ b/src/dbStatic/dbLexRoutines.c @@ -112,8 +112,6 @@ static void yyerrorAbort(char *str) { yyerror(str); yyAbort = TRUE; - while (ellCount(&tempList)) - popFirstTemp(); } static void allocTemp(void *pvoid) @@ -256,6 +254,11 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp, my_buffer_ptr = my_buffer; ellAdd(&inputFileList,&pinputFile->node); status = pvt_yy_parse(); + + if (yyAbort) + while (ellCount(&tempList)) + popFirstTemp(); + dbFreePath(pdbbase); if(!status) { /*add RTYP and VERS as an attribute */ DBENTRY dbEntry; @@ -923,7 +926,7 @@ static void dbRecordHead(char *recordType, char *name, int visible) allocTemp(pdbentry); status = dbFindRecordType(pdbentry, recordType); if (status) { - epicsPrintf("Record \"%s\" is of unknown type \"%s\" - ", + epicsPrintf("Record \"%s\" is of unknown type \"%s\"\n", name, recordType); yyerrorAbort(NULL); return; @@ -932,8 +935,8 @@ static void dbRecordHead(char *recordType, char *name, int visible) status = dbCreateRecord(pdbentry,name); if (status==S_dbLib_recExists) { if (strcmp(recordType, dbGetRecordTypeName(pdbentry))!=0) { - epicsPrintf("Record \"%s\" already defined with different type " - "\"%s\"\n", name, dbGetRecordTypeName(pdbentry)); + epicsPrintf("Record \"%s\" of type \"%s\" redefined with new type " + "\"%s\"\n", name, dbGetRecordTypeName(pdbentry), recordType); yyerror(NULL); duplicate = TRUE; return;