[Date Prev][Date Next]
(ITS#8480) running sample-mdb without ./testdb/
Full_Name: gian paolo ciceri
Version: lmdb 0.9.18
Submission from: (NULL) (220.127.116.11)
With lmdb (fresh git clone), if you run the standard sample-mdb.c example
program WITHOUT creating the ./testdb/ directory for the database before, you
take error 2 No such file or directory after the open. OK, but if you still
proceed to the begin the transaction, you take a segmentation fault 11: there's
what gdb says
Program received signal SIGSEGV, Segmentation fault.
0x0000000100001443 in mdb_txn_renew0 (txn=0x0) at ../mdb.c:2619
2619 MDB_env *env =xtxn->mt_env;
Of course there is NO reason to begin the tnx if the open fails, but should not
be better to trap this situation and comply instead of proceed and generate the
segfault? Perhaps you suppose the program knows what is doing, but I (as
programmer) am less sure of myself.
Best regards, thanks for your attention.