Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007626OCamlruntime system and C interfacepublic2017-09-13 23:072017-09-24 17:17
Reporterceastlund 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSLinuxOS Version
Product Version4.04.2 
Target VersionFixed in Version4.06.0 +dev/beta1/beta2/rc1 
Summary0007626: Sys.executable_name on Linux does not use /proc/self/exe if full path exceeds 256 characters
DescriptionOn Linux, Sys.executable_name depends on /proc/self/exe if the symlink can be read, and otherwise falls back on argv[0]. The buffer used to read /proc/self/exe is 256 characters, so for long paths this always fails.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018253)
gasche (developer)
2017-09-14 09:02

I believe that this was already fixed by Xavier Leroy in the commit

  https://github.com/ocaml/ocaml/commit/a91d6a5470ab5d97f425d5a9f9e1a507356b292e [^]

which was included in 4.05.

Could you try to reproduce the issue using 4.05.0?
(0018254)
ceastlund (reporter)
2017-09-14 16:38

I tried this with 4.05.0 and while that patch is included, Sys.executable_name still does not match /proc/self/exe for long paths. I still get the argv[0] form of the path.
(0018255)
xclerc (reporter)
2017-09-14 17:40

There has been recent activity on the PR that led to the commit
pointed by gasche:

    https://github.com/ocaml/ocaml/pull/795 [^]

It might be worthwhile to test with trunk.
(0018322)
xleroy (administrator)
2017-09-24 17:17

Tested on 4.06 with an executable file name of 349 characters, correctly read from /proc/self/exe. If you're still observing failures, please reopen this report.

- Issue History
Date Modified Username Field Change
2017-09-13 23:07 ceastlund New Issue
2017-09-14 09:02 gasche Note Added: 0018253
2017-09-14 09:02 gasche Assigned To => gasche
2017-09-14 09:02 gasche Status new => feedback
2017-09-14 16:38 ceastlund Note Added: 0018254
2017-09-14 16:38 ceastlund Status feedback => assigned
2017-09-14 17:40 xclerc Note Added: 0018255
2017-09-24 17:17 xleroy Note Added: 0018322
2017-09-24 17:17 xleroy Status assigned => resolved
2017-09-24 17:17 xleroy Resolution open => fixed
2017-09-24 17:17 xleroy Fixed in Version => 4.06.0 +dev/beta1/beta2/rc1


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker