[pybsddb] Issue in DBEnv_memp_stat

Jesus Cea jcea at jcea.es
Mon Dec 16 01:35:08 CET 2024


On 12/12/24 7:42, Rishin Goswami -X (rishigos - WIPRO LIMITED at Cisco) 
wrote:
> Hello,
> 
> I could not find any issue-tracker for the 
> https://pypi.org/project/berkeleydb/ 
> <https://pypi.org/project/berkeleydb/> project, so I am communicating 
> about a bug in this mailing list. If there is an issue-tracker, please 
> let me know and I will raise it there.

The mailing list is the right venue.

> The issue is in the `DBEnv_memp_stat` function. When calling the 
> `memp_stat`function, we are expecting that the value of `fsp` variable 
> is non NULL. However as per the official documentation, `fsp` can be 
> NULL when “/If no individual files currently exist in the cache/”. For 
> example when `db_env_create` has been done, but we have not yet done a 
> `db_create` followed by a `db->open`. This will cause a NULL pointer 
> reference when looping over `fsp` further down the code and causes a crash.

Thanks for your nice bug report, including triage and code to reproduce 
the crash. With that work done by you, the patch was quite trivial, thanks.

I am just releasing Berkeley DB 18.1.12. It is already available in PyPI.

Thanks.

-- 
Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - https://www.jcea.es/    _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea at jabber.org  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz


More information about the pybsddb mailing list