YottaDB / YDB

Mirrored from https://gitlab.com/YottaDB/DB/YDB
Other
76 stars 37 forks source link

Remove assert in zro_search.c that fails if invalid routine name is specified when $zroutines has a .so file in its list #300

Closed nars1 closed 6 years ago

nars1 commented 6 years ago

Below is a simple test case with a debug build of YottaDB.

> cat y.m
        write "version 1",!

> setenv ydb_routines ".* $ydb_dist"

> $gtm_dist/mumps -run %XCMD 'zlink "y^1" do ^y'
%YDB-E-ZLINKFILE, Error while zlinking "y^1"
%YDB-E-FILENOTFND, File y^1 not found

> setenv ydb_routines ".* $ydb_dist $ydb_dist/plugin/libgtmposix.so"

> $gtm_dist/mumps -run %XCMD 'zlink "y^1" do ^y'
%YDB-F-ASSERT, Assert failed in sr_unix/zro_search.c line 104 for expression (valid_mname(&rtnname))

This proves that we cannot assert on the validity of a routine name in the code where we process a shared library specification in the $zroutines list. That debug-only code is therefore removed.