Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000218OCamlOCaml generalpublic2000-11-07 16:352000-11-07 16:46
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000218: int_of_string
DescriptionFull_Name: c'est dans mon adresse
Version: 3.00
OS: tru64XX
Submission from: oto.inria.fr (192.93.2.2)


        Objective Caml version 3.00

# print_endline (Printf.sprintf "0o%o\n" (int_of_string "0o8899"));;
0o11121

- : unit = ()

On attendrait Invalid Argument ou une autre exception, non ?

Fix: Par exemple, dans byterun/int.c, fn parse_long:
  p = parse_sign_and_base(p, &base, &sign);
  d = parse_digit(p);
  if (d < 0) failwith("int_of_string");
peut-etre que:
  if (d < 0 || d >= *base) failwith...
suffirait.

Merci!

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000463)
administrator (administrator)
2000-11-07 16:45

> Objective Caml version 3.00
>
> # print_endline (Printf.sprintf "0o%o\n" (int_of_string "0o8899"));;
> 0o11121
>
> - : unit = ()
>
> On attendrait Invalid Argument ou une autre exception, non ?

Exact. C'est un bug dans OCaml 3.00, qui est maintenant corrige dans la
version de travail. Merci de l'avoir signale.

- Xavier
(0000464)
administrator (administrator)
2000-11-07 16:46

Fixed 2000-08-08 by Xavier (see PR#178).

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker