forked from ocaml-ppx/ocaml-migrate-parsetree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ocaml-ppx#97: version-specific magic numbers check in `Ast_4NN.re…
…gister` This commit fixes ocaml-ppx#97 which caused segfaults: `Ast_4NN.register` now correctly checks AST magic number against the version-specific magic number instead of using the magic number defined in the `Config` module of the current compiler. Version-specific magic numbers was already defined by overriding `Config` module later in the file: the fix just consists in riding up the overriding of `Config` before the overriding of `Ast_helper`. Following Gabriel Scherer's trick recommended in ocaml-ppx/ppx_deriving#210 (comment) a unit-value `in_ast_4nn` is defined in `Config` module and used in `Ast_helper.register` to ensure that the module are well ordered.
- Loading branch information
1 parent
1947fe8
commit f336d74
Showing
5 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters