Skip to content

Memory corruption with slighthly bigger alphabets. #74

Description

@c4f3a0ce

When I try to use Trie with larger alphabet I start to experience different memory related issue. Details differ from Python version to Python version, and environment, but in general following:

import datrie

xs = [chr(i) for i in range(500)]

datrie.Trie(xs[:250])  # Works fine
datrie.Trie(xs[250:])  # Works fine

datrie.Trie(xs)  # Fails miserably 

fails when executed as script with:

malloc(): invalid size (unsorted)
[1]    19260 abort      python foo.py

In IPython I got:

corrupted double-linked list                                                                                                                                                    
[1]    19270 abort      ipython

or

malloc(): invalid size (unsorted)
[1]    19364 abort      ipython

and some other, less common failures.

This specific outcomes tested with

  • datrie==0.8
  • Python 3.7.3
  • IPython 7.10.1

Is this something expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions