art-w / sherlodoc

Fuzzy type search for OCaml documentation
MIT License
73 stars 6 forks source link

Ancient segfaults when given no odocls #8

Closed EmileTrotignon closed 9 months ago

EmileTrotignon commented 9 months ago

Here is an extract from the cram test that triggered this issue

  $ export SHERLODOC_DB=db.bin
  $ export SHERLODOC_FORMAT=ancient
  $ sherlodoc index --index-docstring=false $(find ./docs/odoc/base/ -name "*.odocl") > /dev/null
  find: './docs/odoc/base/': No such file or directory
  $ sherlodoc search --print-cost --limit 100 "S_poly"
  232411 Segmentation fault      (core dumped) sherlodoc search --print-cost --limit 100 "S_poly"
  [139]

It does not happen with marshal :

  $ export SHERLODOC_DB=db.bin
  $ export SHERLODOC_FORMAT=marshal
  $ sherlodoc index --index-docstring=false $(find ./docs/odoc/base/ -name "*.odocl") > /dev/null
  find: './docs/odoc/base/': No such file or directory
  $ sherlodoc search --print-cost --limit 100 "S_poly"
  [No results]
art-w commented 9 months ago

I believe this was fixed in #4 but we need to keep watch on ancient segfaults in the future :/