Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007652OCamlruntime system and C interfacepublic2017-10-05 12:502017-10-26 14:46
Reporterdra 
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.06.0 +dev/beta1/beta2/rc1 
Target Version4.06.0 +dev/beta1/beta2/rc1Fixed in Version 
Summary0007652: caml_strdup is no longer available without defining CAML_INTERNALS
DescriptionGPR#71 (https://github.com/ocaml/ocaml/pull/71 [^]) deprecated caml_strdup but the symbol is only defined if CAML_INTERNALS is defined, which breaks any non-OCaml C stubs using it.
Additional Informationhttps://github.com/ocaml/ocaml/pull/71#pullrequestreview-67307040 [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018485)
dra (developer)
2017-10-05 13:09

Removed the incorrect reference to caml_aligned_malloc
(0018486)
dra (developer)
2017-10-05 13:14

I'm not completely sure, but I don't think that the fix for this is to move the #define outside a CAML_INTERNALS block.

There is a discussion in the GPR about the removal of caml_strdup - skimming through it, it's possible that what should change is documentation to show that we removed caml_strdup and that code should be *updated* to use caml_stat_strdup (with any corresponding free call changed to caml_stat_free). Max's analysis of opam seemed to suggest that correct usage of caml_strdup which very limited.
(0018594)
gasche (developer)
2017-10-19 17:07

dra, let's move on with the plan of properly documenting the breakage (first, is "caml_strdup" present in a star-marked Changes entry ? If not, maybe we could create one pointing at GPR#71, or at least add it to the GPR's existing entry). Would you be able to submit a PR for this shortly?
(0018602)
dra (developer)
2017-10-20 10:46

I'm not sure that was the original intention of GPR#71, though?
(0018607)
gasche (developer)
2017-10-20 13:59

Ok, so I pinged Max in the PR.
(0018612)
murmour (reporter)
2017-10-23 23:40

Putting those aliases into CAML_INTERNALS was not intentional, and is likely an artefact of a sloppy rebase. There should be no breakage in the client code, unless the runtime is started with caml_startup_pooled (which requires that caml_stat_* blocks are only disposed with caml_stat_free).

Fix: https://github.com/ocaml/ocaml/pull/1442. [^]

- Issue History
Date Modified Username Field Change
2017-10-05 12:50 dra New Issue
2017-10-05 13:08 dra Summary caml_strdup and caml_aligned_malloc are no longer available without defining CAML_INTERNALS => caml_strdup is no longer available without defining CAML_INTERNALS
2017-10-05 13:08 dra Description Updated View Revisions
2017-10-05 13:09 dra Note Added: 0018485
2017-10-05 13:14 dra Note Added: 0018486
2017-10-05 13:14 dra Status new => confirmed
2017-10-19 17:07 gasche Note Added: 0018594
2017-10-20 10:46 dra Note Added: 0018602
2017-10-20 13:59 gasche Note Added: 0018607
2017-10-23 23:40 murmour Note Added: 0018612
2017-10-26 14:46 frisch Status confirmed => resolved
2017-10-26 14:46 frisch Resolution open => fixed
2017-10-26 14:46 frisch Assigned To => frisch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker