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

Unix.environment segfault after a call to clearenv #5335

vicuna opened this issue Aug 14, 2011 · 0 comments


None yet
1 participant
Copy link

commented Aug 14, 2011

Original bug ID: 5335
Reporter: @diml
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @ygrek

Bug description

After a call to clearenv the C variable environ is set to NULL and this make Unix.environment to segfault:

#require "extunix";;

/usr/lib/ocaml/unix.cma: loaded
/usr/lib/ocaml/extunix: added to search path
/usr/lib/ocaml/extunix/extunix.cma: loaded

ExtUnix.Specific.clearenv ();;

  • : unit = ()

Unix.environment ();;

Erreur de segmentation

@vicuna vicuna closed this Sep 25, 2012

@vicuna vicuna added the bug label Mar 20, 2019

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.