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
petite imprecision du backtrace #3054
Comments
Comment author: administrator
Le bug cosmétique est corrigé. Pour ce qui est des backtrace
|
Comment author: administrator Date: Mon, 26 Nov 2001 17:11:12 +0100
let call_bogue () = bogue "abc" 5;; let main () = call_bogue ();; main ();;$ ocamlc -g -custom bug-bt.ml -o bug-bt Bruno. |
Comment author: administrator Problem with s.[i] raising an exception but not recorded in the backtrace. Fixed |
Original bug ID: 654
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Objective Caml version 3.03 ALPHA+4 (2001-11-16)
J'ai cette trace:
Fatal error: uncaught exception Invalid_argument("String.get")
Raised from a C functionCalled from module Cash-tramp, character 1152
Called from module Cash-tramp, character 1561
Called from module Cash-tramp, character 3656
Le source correspondant est (en syntaxe révisée, mais ça se comprend):
value rindex_blank str from =
loop from where rec loop i = if i < 0 || ' ' = str.[i] then i else loop (pred i)
;
value split_additional_args line =
loop (String.length line) [] where rec loop upper splitted =
if upper < 0 then splitted
else
let lower = if upper = 0 then -1 else rindex_blank line upper in
Char 1152 ___________________________________________________________^
loop lower [String.sub line (succ lower) (upper - lower - 1) :: splitted]
;
Il n'y a visiblement pas de String.get dans split_additional_args, donc:
rindex_blank, près de str.[i]. Il y a sans doute des cas plus
troublants que celui-ci, e.g. quand la fonction manquante a des
centaines de String.get.
Bruno.
The text was updated successfully, but these errors were encountered: