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

ocamlopt -output-obj failure #3500

Closed
vicuna opened this issue Aug 3, 2002 · 2 comments
Closed

ocamlopt -output-obj failure #3500

vicuna opened this issue Aug 3, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 3, 2002

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

Bug description

Full_Name: Ohad Rodeh
Version: 3.05
OS: win2000
Submission from: slip139-92-208-111.tel.il.prserv.net (139.92.208.111)

ocamlopt -output-obj fails on the following program:


type tree =
Node
| Br of tree * int * tree

let rec gen_tree () =
let i = Random.int 5 in
if i < 3 then Node
else Br (gen_tree (), i, gen_tree ())

let _ =
while true do
let x = gen_tree () in
()
done


ocamlc -output-obj works just fine. The error codes are:

ocamlopt  -c x.ml -o x.cmx
ocamlopt -output-obj  -o x.obj x.cmx

LIB : error : Internal error during ReadSymbolTable

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0040C768
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000001
ExceptionInformation[ 1] = 00360000

CONTEXT:
Eax = 00000008 Esp = 0012EE28
Ebx = 002FA7F8 Ebp = 00000008
Ecx = 00000002 Esi = 00402AB4
Edx = 00000008 Edi = 00360000
Eip = 0040C768 EFlags = 00010212
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012EE28 Dr3 = 002FA7F8
Dr1 = 00000008 Dr6 = 00000002
Dr2 = 00000000 Dr7 = 00000000
Error during linking
NMAKE : fatal error U1077: 'ocamlopt' : return code '0x2'

@vicuna
Copy link
Author

vicuna commented Aug 5, 2002

Comment author: administrator

ocamlopt -c x.ml -o x.cmx
ocamlopt -output-obj -o x.obj x.cmx

LIB : error : Internal error during ReadSymbolTable

The first line creates both a summary file x.cmx and an actual object
file x.obj. The second line invokes Microsoft's LIB utility with
x.obj as input and as output. Clearly, LIB doesn't like this :-)

Everything works well if you change the name of the output object in
the second line.

I agree LIB should emit a better diagnostic rather than just crash,
but that's something we can't do much about.

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Aug 5, 2002

Comment author: administrator

Problem with Microsoft's LIB.

@vicuna vicuna closed this as completed Aug 5, 2002
@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