You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1702 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Je viens de découvrir ça:
(sur Linux)
$ /usr/local/adm/src/caml/bin/cashr
Objective Caml version 3.06+34 (2003-05-21)
Camlp4s Parsing version 3.06+34
Cash.host_info_name "dixie";
Segmentation fault
(Sur Linux, Solaris, Dec alpha)
3 /usr/local/bin/cashr (version moins récente de cash)
Objective Caml version 3.06
Camlp4 Parsing version 3.06
Cash.host_info_name "dixie";
Segmentation fault
Comme dixie n'est pas dans le DNS, ça lève une exception
Cash.Netdb_error HOST_NOT_FOUND
qui semble provoquer le seg fault quand ocamlrun tente de l'imprimer ?
(Un try autour de l'appel à host_info_name fonctionne très bien).
Ce que je ne comprend pas du tout: j'ai observé ça dans un script cash (en
compilé byte-code, c'est pareil). Hors j'ai un autre script auquel il
manquait aussi un try autour de host_info_name, et ça imprimait parfaitement
l'exception (mais il est peut-être suffisant de reproduire le seg fault
ci-dessus ?)
Bruno.
PS: gdb ne me donne pas beaucoup d'info:
3 gdb /usr/local/adm/src/caml/csl/byterun/ocamlrund core
warning: core file may not match specified executable file.
Core was generated by `/usr/local/adm/src/caml/csl/byterun/ocamlrund /usr/local/adm/src/cash/cashrtop'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from [un paquet de .so]...done.
#0 0x0805f87b in obj_tag (arg=134540081) at obj.c:51
51 return Val_int(Tag_val(arg));
gdb:bt
#0 0x0805f87b in obj_tag (arg=134540081) at obj.c:51 #1 0x08066878 in interprete (prog=0x11, prog_size=100) at interp.c:846
The text was updated successfully, but these errors were encountered:
Je viens de découvrir ça:
(sur Linux)
$ /usr/local/adm/src/caml/bin/cashr
Objective Caml version 3.06+34 (2003-05-21)
Camlp4s Parsing version 3.06+34
Cash.host_info_name "dixie";
Segmentation fault
Comme dixie n'est pas dans le DNS, ça lève une exception
Cash.Netdb_error HOST_NOT_FOUND
qui semble provoquer le seg fault quand ocamlrun tente de l'imprimer ?
(Un try autour de l'appel à host_info_name fonctionne très bien).
Oui, l'argument de l'exception Netdb_error est mal formé.
Le problème semble être dans ton code (fichier cash-prims.c):
CAMLprim value get_h_errno (value syscall)
{
int i, herr;
for (herr = h_errno, i = 0; i < (sizeof (h_errno_values) / sizeof (int)); i++)
{
if (herr == h_errno_values[i])
return Int_val (i);
^^^^^^^
Désolé de t'avoir fait déboguer mon code. J'ai dû me laisser distraire par
le fait que j'ai vu au moins une fois l'exception correctement imprimée.
Bien qu'à la réflexion ça n'incitait pas plus à croire en un bug du
run-time Caml qu'à me méfier et relire mon code... :-(
Original bug ID: 1702
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Je viens de découvrir ça:
(sur Linux)
$ /usr/local/adm/src/caml/bin/cashr
Objective Caml version 3.06+34 (2003-05-21)
Cash.host_info_name "dixie";
Segmentation fault
(Sur Linux, Solaris, Dec alpha)
3 /usr/local/bin/cashr (version moins récente de cash)
Objective Caml version 3.06
Cash.host_info_name "dixie";
Segmentation fault
Comme dixie n'est pas dans le DNS, ça lève une exception
Cash.Netdb_error HOST_NOT_FOUND
qui semble provoquer le seg fault quand ocamlrun tente de l'imprimer ?
(Un try autour de l'appel à host_info_name fonctionne très bien).
Ce que je ne comprend pas du tout: j'ai observé ça dans un script cash (en
compilé byte-code, c'est pareil). Hors j'ai un autre script auquel il
manquait aussi un try autour de host_info_name, et ça imprimait parfaitement
l'exception (mais il est peut-être suffisant de reproduire le seg fault
ci-dessus ?)
Bruno.
PS: gdb ne me donne pas beaucoup d'info:
3 gdb /usr/local/adm/src/caml/csl/byterun/ocamlrund core
warning: core file may not match specified executable file.
Core was generated by `/usr/local/adm/src/caml/csl/byterun/ocamlrund /usr/local/adm/src/cash/cashrtop'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from [un paquet de .so]...done.
#0 0x0805f87b in obj_tag (arg=134540081) at obj.c:51
51 return Val_int(Tag_val(arg));
gdb:bt
#0 0x0805f87b in obj_tag (arg=134540081) at obj.c:51
#1 0x08066878 in interprete (prog=0x11, prog_size=100) at interp.c:846
The text was updated successfully, but these errors were encountered: