Skip to content
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

ocamldoc stack overflow (bytecode) segfault (native) #2589

Closed
vicuna opened this issue May 18, 2004 · 1 comment
Closed

ocamldoc stack overflow (bytecode) segfault (native) #2589

vicuna opened this issue May 18, 2004 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented May 18, 2004

Original bug ID: 2589
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Daniel Buenzli
Version: 3.07+2
OS: macos 10.3.3
Submission from: lamp2priv1.epfl.ch (128.178.154.46)

Dear bugtracker,

The following valid mli file makes ocamldoc.opt segfault

---test.mli---
module type A = sig end
module A : A

ocamldoc -html test.mli
Fatal error: exception Stack_overflow
ocamldoc.opt -html test.mli
Segmentation fault

It seems to me that the problem comes from the fact that ocamldoc doesn't
differentiate (at least at the level of generated file) module type names from
module names. For example if I have the following file

---test.mli---
module type B = sig (** B type doc ) end
module B : sig (
* B module doc *) end

And that I generate its html documentation. Then if I click on the link for the
documentation of module B, I get on the documentation of the module type B
which is not the expected linkage. The documentation for the B module is not
generated at all or maybe gets overwritten by the documentation for the module
type.

Regards,

Daniel

@vicuna
Copy link
Author

vicuna commented Jun 25, 2004

Comment author: administrator

Hello,

On Tue, 18 May 2004 14:07:56 +0200 (MET DST)
daniel.buenzli@epfl.ch wrote:

Full_Name: Daniel Buenzli
Version: 3.07+2
OS: macos 10.3.3
Submission from: lamp2priv1.epfl.ch (128.178.154.46)

Dear bugtracker,

The following valid mli file makes ocamldoc.opt segfault

---test.mli---
module type A = sig end
module A : A

ocamldoc -html test.mli
Fatal error: exception Stack_overflow
ocamldoc.opt -html test.mli
Segmentation fault

This is now fixed in the current CVS but...

It seems to me that the problem comes from the fact that ocamldoc doesn't
differentiate (at least at the level of generated file) module type names from
module names. For example if I have the following file

---test.mli---
module type B = sig (** B type doc ) end
module B : sig (
* B module doc *) end

And that I generate its html documentation. Then if I click on the link for
the documentation of module B, I get on the documentation of the module type
B which is not the expected linkage. The documentation for the B module is not
generated at all or maybe gets overwritten by the documentation for the module
type.

... if you check section 15.1.3 of the Objective Caml manual (Coding rules for
ocamldoc), you can read that:
"In a module, there must not be two modules, two module types or a module and a
module type with the same name."

Indeed, the html file for the module type Foo.A is the same as the html file for
the module Foo.A.

Thanks for the report,

Maxence Guesdon

@vicuna vicuna closed this as completed Jun 25, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant