Coder Social home page Coder Social logo

torden / py-mdbm Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 1.0 934 KB

Just! Python interface for Y! MDBM, Python MDBM Wapper

Home Page: https://torden.github.io/py-mdbm/

License: MIT License

Makefile 2.25% C 71.19% Python 26.55%
mdbm python key-value database dbm py-mdbm python3 pypy pypy3 pymdbm

py-mdbm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dvzubarev

py-mdbm's Issues

Support storing bytes

Hi, thank you for this package.
When trying to store byte-string:
dbm.store(b"key2", b"binary vale", mdbm.MDBM_INSERT)
I get following error:
mdbm.Error: Error - There was a missing parameter: key and value from here.
It would be good if byte-strings were supported too.

SegmentFault while run on pytest-performance

Program terminated with signal SIGSEGV, Segmentation fault.

warning: Unexpected size of section `.reg-xstate/25978' in core file.
#0  0x000055c0c62db2a4 in visit_decref (op=0x7fb27f77d378, data=data@entry=0x0) at Modules/gcmodule.c:360
360         if (PyObject_IS_GC(op)) {
(gdb) bt
#0  0x000055c0c62db2a4 in visit_decref (op=0x7fb27f77d378, data=data@entry=0x0) at Modules/gcmodule.c:360
#1  0x000055c0c632b74b in frame_traverse (f=0x55c0c70428a0, visit=0x55c0c62db250 <visit_decref>, arg=0x0) at Objects/frameobject.c:510
#2  0x000055c0c62d9cd4 in subtract_refs (containers=<optimized out>) at Modules/gcmodule.c:385
#3  collect (generation=0) at Modules/gcmodule.c:925
#4  0x000055c0c62db8f7 in collect_generations () at Modules/gcmodule.c:1050
#5  _PyObject_GC_Malloc (basicsize=<optimized out>) at Modules/gcmodule.c:1511
#6  _PyObject_GC_New (tp=tp@entry=0x55c0c65d5da0 <PyListIter_Type>) at Modules/gcmodule.c:1521
#7  0x000055c0c61c8191 in list_iter (seq=0x7fb279aa2a70) at Objects/listobject.c:2879
#8  0x000055c0c6191254 in PyObject_GetIter (o=o@entry=0x7fb279aa2a70) at Objects/abstract.c:3097
#9  0x000055c0c6273fbc in PyEval_EvalFrameEx (f=f@entry=0x7fb279454620, throwflag=throwflag@entry=0) at Python/ceval.c:2797
#10 0x000055c0c627c93e in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7fffd3835ad8, func=0x7fb27d1be320) at Python/ceval.c:4442

Segment faile in mdbm_store_r

Situation

  • Open Flags include MDBM_PROTECT
  • Run the mdbm_store
  • Segfault.
b#0  mdbm_store_r (db=0x563a66299a40, key=key@entry=0x7ffe711ec5d0, val=val@entry=0x7ffe711ec5c0, flags=0, iter=iter@entry=0x0) at mdbm.c:4867
4867        if (esize > maxesize || (db->db_spillsize && MDBM_LOB_ENABLED(db) && vsize >= db->db_spillsize)) {
(gdb) bt
#0  mdbm_store_r (db=0x563a66299a40, key=key@entry=0x7ffe711ec5d0, val=val@entry=0x7ffe711ec5c0, flags=0, iter=iter@entry=0x0) at mdbm.c:4867
#1  0x00007fb6e6cebf2a in mdbm_store (db=<optimized out>, key=..., val=..., flags=<optimized out>) at mdbm.c:5279
4862        }
4863        kvsize = ksize + vsize;
4864        esize = kvsize + MDBM_ENTRY_T_SIZE;
4865        maxesize = db->db_pagesize-MDBM_PAGE_T_SIZE-MDBM_ENTRY_T_SIZE;
4866
4867        if (esize > maxesize || (db->db_spillsize && MDBM_LOB_ENABLED(db) && vsize >= db->db_spillsize)) {
4868            if (db->db_spillsize) {
4869                want_large = 1;
4870                vsize = MDBM_ALIGN_LEN(db,MDBM_ENTRY_LOB_T_SIZE);
4871                if (MDBM_DB_CACHEMODE(db)) {

I will raise a this issue to mdbm team

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.