Skip to content

Dune segfaults if the codebase contains some UTF-8 chars in (Coq) filenames #3219

@erikmd

Description

@erikmd

Cc @ejgallego @Zimmi48 FYI, I tested the dune subst command (which allows one to automatically add a version: _ line in *.opam files (following the discussion initiated in rocq-prover/rocq#11038 ))

Expected Behavior

The command dune subst returns normally.

Actual Behavior

stdout+stderr:

Error: exception Sys_error("\"test-suite/misc/deps/\\316\\261\\316\\262/\\316\\263\\316\\264.v\": No such file or directory")
Backtrace:
Raised by primitive operation at file "pervasives.ml", line 385, characters 28-54
Called from file "src/stdune/io.ml", line 87, characters 17-37
Called from file "src/stdune/io.ml" (inlined), line 107, characters 29-64
Called from file "src/watermarks.ml", line 155, characters 10-27
Called from file "list.ml", line 85, characters 12-15
Called from file "src/fiber/fiber.ml", line 201, characters 18-23
Called from file "src/fiber/fiber.ml", line 99, characters 6-13

I must not segfault.  Uncertainty is the mind-killer.  Exceptions are
the little-death that brings total obliteration.  I will fully express
my cases.  Execution will pass over me and through me.  And when it
has gone past, I will unwind the stack along its path.  Where the
cases are handled there will be nothing.  Only I will remain.

Reproduction

  1. git clone https://github.com/coq/coq.git
  2. cd coq
  3. dune subst

Specifications

  • Version of dune (output of dune --version): 1.11.3
  • Version of ocaml (output of ocamlc --version): 4.05.0
  • Operating system (distribution and version): GNU/Linux Debian

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions