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

Segmentation fault when passing extra arguments to Printexc.raise_with_partial_backtrace #7674

Closed
vicuna opened this issue Nov 20, 2017 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Nov 20, 2017

Original bug ID: 7674
Reporter: @nojb
Assigned to: @nojb
Status: resolved (set by @nojb on 2018-04-09T13:02:21Z)
Resolution: fixed
Priority: normal
Severity: minor
Category: standard library
Related to: #7666
Monitored by: @gasche

Bug description

When passing extra (> 2) arguments to Printexc.raise_with_partial_backtrace, a segmentation fault is produced.

Incidentally, this issue was discovered while working on a solution for #7666, which reported a compilation problem when passing < 2 arguments to this function.

Steps to reproduce

$ ./ocamlrun ../ocaml
OCaml version 4.07.0+dev0-2017-09-18

let bt = Printexc.get_raw_backtrace ();;

val bt : Printexc.raw_backtrace =

Printexc.raise_with_backtrace Exit bt;;

Exception: Pervasives.Exit.

Printexc.raise_with_backtrace Exit bt 1;;

Warning 20: this argument will not be used by the function.
Segmentation fault (core dumped)

@vicuna
Copy link
Author

vicuna commented Nov 20, 2017

Comment author: @nojb

I am investigating this as part of #7666, will propose a fix in #1465.

@vicuna
Copy link
Author

vicuna commented Jan 4, 2018

Comment author: @nojb

See #1557 for a more general approach to fixing this and other primitive-related issues.

@vicuna
Copy link
Author

vicuna commented Apr 9, 2018

Comment author: @nojb

#1557 merged; issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants