caml_invalid_argument can't be used with dynamically allocated strings #7423
Original bug ID: 7423
caml_invalid_argument(str) is no return and does not free it's
Reply from Gabriel Scherer:
Steps to reproduce
char* error = new char;
allocated memory is lost here.
Comment author: @gasche
Richard W. Jones mentioned that he could use a similar feature on the mailing-list: https://sympa.inria.fr/sympa/arc/caml-list/2016-12/msg00021.html
The stack-based solutions rely on guessing arbitrary size limits on the dynamic strings, which is often possibles but sometimes inconvenient/inelegant.