-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
In sai_vm_db_init(), the db_path to the DB is acquired from the SAI_DB_CONFIG_FILE. The db_path string is defined to be a constant obtained from the config file. The db_path should only be considered valid as long as the config file is open. At end of the sai_vm_db_init(), the function used db_path to open the database AFTER the config file is closed. This is a bug - you are only getting away with it on Debian because the garbage collection is not aggressive. On Ubuntu 16.04, you end up using a garbage DB name.
I suggest you move the config file close to the end of the function or, at least, after the final reference to any constant string derived from the config file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels