-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dune subst crashes on large files (32-bit systems) #9538
Comments
Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Can you give a size (example) ? |
There's a test case in #9539. https://github.com/ocaml/dune/blob/3.13.0/bin/subst.ml#L113 (the root cause is that the size of strings needs to fit in the header of an ocaml block) In term of fix, personally I would consider it enough to catch the exception and log a warning. It's extremely unlikely that some users rely on substitution working on large files. If that's the case, we'll see another bug report. |
You're right we'll see another bug report cause 16MB is not that huge though. I think if we can fix it without a performance loss, it could be fine. |
Please, let's just emit a warning for this. 16MB files exist, but we don't
need to make substitutions in them for now. There are more important fixes
to do first.
|
Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Fixes #9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]>
Fixes #9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]>
Fixes #9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]>
* test: add repro for #9538 (subst on 32-bit) (#9539) Signed-off-by: Etienne Millon <[email protected]> * refactor: detect large files in Io functions (#9828) `Io.read_all` and related functions read the contents of a file in a string, which has a size limit (`Sys.max_string_length`) and can be an issue in 32-bit systems. This makes an explicit check and raises a `Code_error` in these situations. Signed-off-by: Etienne Millon <[email protected]> * fix(subst): ignore large files (#9811) Fixes #9538 This logs a warning for large files (>16MB on 32-bit systems). Signed-off-by: Etienne Millon <[email protected]> --------- Signed-off-by: Etienne Millon <[email protected]>
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
dune subst
crashes on 32-bit systems when a large file is present:(true as of 3.12.1)
The text was updated successfully, but these errors were encountered: