Skip to content

Creating index causes Segmentation fault #53

Description

@jcberentsen

After installing with:
$ cabal new-install hw-json-simd, running the example causes a segmentation fault.

$ echo "{}" | pv -t -e -b -a | hw-json-simd create-index --method standard -i /dev/stdin --output-ib-file test.json.ib.idx --output-bp-file test.json.bp.idx

3.00 B 0:00:00 [53.3KiB/s]
Segmentation fault (core dumped

The same happens with --method standard (and larger json input than this ;)

This is an attempt at stripping down a problem I had with using
fromByteStringViaSimd from hw-json where it also segfaults. The same code using fromByteStringViaBlanking works fine.

The fromByteStringViaSimd problem was tested on two different x86 machines (one without bmi2 support)
Looking at the code, the fromByteStringViaSimd seems to attempt to safeguard on the CPU capabilities, maybe it is not working as intended?

I also tried to pass diverse flags (via stack.yaml) to enable sse42, bmi2 and avx2 for various packages in the hw- ecosystem, without luck :(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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