pveber / ocaml-r

Objective Caml binding embedding the R interpreter
GNU General Public License v3.0
35 stars 4 forks source link

Segfault when accessing an error message. #1

Closed pveber closed 11 years ago

pveber commented 11 years ago

Destructuring an R.Runtime_error exception leads to a segfault:

$ try ignore (R.eval_string "azer") ; ""  with R.Runtime_error (_,x) -> x ;;
Erreur : objet 'azer' introuvable
Erreur de segmentation                              
pveber commented 11 years ago

The code at fault here is the construction of the exception value after detecting an error during R eval. The code builds a block with the correct tag but with a single argument that is a tuple, while it should build a block with two arguments.

pveber commented 11 years ago

check notes in the commit for further details.