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

Debug section is sometimes not readable when using -pack #6549

Closed
vicuna opened this issue Sep 10, 2014 · 1 comment
Closed

Debug section is sometimes not readable when using -pack #6549

vicuna opened this issue Sep 10, 2014 · 1 comment
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Sep 10, 2014

Original bug ID: 6549
Reporter: @hhugo
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:34:48Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.1+dev
Category: back end (clambda to assembly)
Monitored by: @gasche

Bug description

the DBUG section of packed object is wrong when there are no debug_event available.
this is due to missing begin_end in the following code (bytepackager.ml line 225)

if !Clflags.debug && !events <> [] then
output_value oc (List.rev !events);
output_value oc (StringSet.elements !debug_dirs);

try to use ocamldebug or js_of_ocaml on a bytecode program with this kind of invalid debug section with result in a crash

Uncaught exception: Failure("input_value: bad object")

File attachments

@vicuna
Copy link
Author

vicuna commented Sep 19, 2014

Comment author: @gasche

Fixed in 4.02.

@vicuna vicuna closed this as completed Dec 7, 2016
@vicuna vicuna added this to the 4.02.1 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants