Skip to content
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

debugger: avoid out of bounds access #1771

Merged
merged 1 commit into from May 8, 2018

Conversation

Projects
None yet
2 participants
@trefis
Copy link
Contributor

trefis commented May 8, 2018

Test case:

$ cat test_debugger.ml
let x = 3

let () =
  Printf.printf "%d\n" x
$ ocamlc -o test_debugger.exe -g ./test_debugger.ml
$ ocamldebug ./test_debugger.exe
	OCaml Debugger version 4.08.0+dev0-2018-04-09

(ocd) break @Test_debugger 4
Loading program... done.
Can't find any event there.

Without this GPR, instead of printing that last line, we'd get "Uncaught exception: Invalid argument ..." and the debugger would exit.

@trefis

This comment has been minimized.

Copy link
Contributor Author

trefis commented May 8, 2018

I decided to the changes entry in the 4.07 section (i.e. I plan to cherry-pick this on 4.07), as this is seems to me to be a clearly safe bugfix.

@gasche

gasche approved these changes May 8, 2018

Copy link
Member

gasche left a comment

Good catch, thanks! I agree this is fine for 4.07.

Good to merge once the CI returns.

@trefis trefis merged commit 1abc01f into ocaml:trunk May 8, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@trefis

This comment has been minimized.

Copy link
Contributor Author

trefis commented May 8, 2018

The CI passed, I merged and cherry-picked on 4.07.
Thanks!

@trefis trefis deleted the trefis:oob-debugger branch May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
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.