Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006081OCamlOCaml generalpublic2013-07-19 11:182014-07-24 22:59
Assigned To 
PlatformOSOS Version
Product Version4.00.1 
Target Versionafter-4.02.0Fixed in Version 
Summary0006081: ocaml should add script's directory to search path, not current directory
DescriptionWhen running "ocaml /path/to/", OCaml searches the current directory first for libraries. This is probably not useful, and can be a security risk. It would make more sense to add the script's directory to the search path instead, as e.g. Python does.
Steps To Reproduce$ cat /usr/local/bin/show_home
#load "unix.cma";;
print_endline (Unix.getenv "HOME")

$ touch /tmp/unix.cma

$ cd /
$ show_home

$ cd /tmp
$ show_home
Fatal error: exception End_of_file
Additional InformationMy attempt at a patch is here: [^]

gasche asked me to report this here: [^]
Attached Filespatch file icon a0b7d7ea9d4f330e0e0c239c89989b769872d27f.patch [^] (4,888 bytes) 2014-01-17 16:12 [Show Content]

- Relationships

-  Notes
doligez (administrator)
2013-08-19 16:55

Makes sense, but I don't think it has anything to do with the runtime system.
doligez (administrator)
2014-01-17 16:13

Got the patch from github and uploaded it here.

(hint: just add ".patch" to github's commit URL to get the raw patch file)

- Issue History
Date Modified Username Field Change
2013-07-19 11:18 talex New Issue
2013-08-19 16:55 doligez Note Added: 0010201
2013-08-19 16:55 doligez Category OCaml runtime system => OCaml general
2013-08-19 16:55 doligez Status new => acknowledged
2013-08-19 16:55 doligez Target Version => 4.01.1+dev
2014-01-17 16:11 doligez Tag Attached: patch
2014-01-17 16:12 doligez File Added: a0b7d7ea9d4f330e0e0c239c89989b769872d27f.patch
2014-01-17 16:13 doligez Note Added: 0010807
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-24 22:59 doligez Target Version 4.02.0+dev => after-4.02.0

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker