OCaml Forge
SCM

Detail: [#768] exceptions don't get registered properly.

Bugs: Browse | Download .csv | Monitor

[#768] exceptions don't get registered properly.

Date:
2010-10-05 09:54
Priority:
5
State:
Open
Submitted by:
Romain Slootmaekers (toolslive)
Assigned to:
St├ęphane Glondu (glondu)
Resolution:
Fixed
Severity:
major
Operating System:
None
Version:
0.6.0
URL:
 
Summary:
exceptions don't get registered properly.

Detailed description
whenever there's something wrong, the binding looks up the exception to be thrown, and throws it.
The exceptions are supposed to be registered in the Bz2 module with
let _ = begin
...
Callback.register_exception "mlbz_data_exn" Data_error;
...
end

unfortunately this does not happen.
(you can add a print statement to see for yourself that it does not get executed in a program)

I attached an archive that contains a program kaboom.ml and a data file that shows the problem.
It crashes with a segmentation violation because
caml_named_value("mlbz_data_exn");

SEGV's

I attached a simple patch that adds a register_exceptions function to explicitly register the exceptions
(maybe that's not what you want)

have fun.

Followup

Message
Date: 2010-11-02 09:50
Sender: St├ęphane Glondu

For those who are following this bug, I've posted a reply there:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602170

Attached Files:

Attachments:
register.patch
bug_demo.tgz

Changes:

Field Old Value Date By
ResolutionAccepted As Bug2010-11-02 11:08glondu
priority32010-11-02 09:50glondu
assigned_tonone2010-11-02 09:50glondu
Operating SystemLinux2010-11-02 09:50glondu
ResolutionNone2010-11-02 09:50glondu
File Added85: bug_demo.tgz2010-10-05 09:54toolslive
File Added86: register.patch2010-10-05 09:54toolslive