All of lore.kernel.org
 help / color / mirror / Atom feed
From: rjones@redhat.com (Richard W.M. Jones)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Compiling with OCaml 4.06 / safe-string
Date: Fri, 17 Nov 2017 19:03:08 +0000	[thread overview]
Message-ID: <20171117190307.GA26286@redhat.com> (raw)

I'm trying to compile coccinelle with OCaml 4.06, where the default
for strings has been switched to -safe-string.

It currently fails to build in the bundled parmap library:

/usr/bin/ocamlc.opt -unsafe -I parmap.1.0-rc7.1 -custom -cclib -lparmap_stubs   -c parmap.1.0-rc7.1/bytearray.ml -o parmap.1.0-rc7.1/bytearray.cmo
File "parmap.1.0-rc7.1/bytearray.ml", line 38, characters 0-118:
Warning 3: deprecated: [@@noalloc] should be used instead of "noalloc"
File "parmap.1.0-rc7.1/bytearray.ml", line 41, characters 0-116:
Warning 3: deprecated: [@@noalloc] should be used instead of "noalloc"
File "parmap.1.0-rc7.1/bytearray.ml", line 47, characters 10-23:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "parmap.1.0-rc7.1/bytearray.ml", line 48, characters 28-29:
Error: This expression has type bytes but an expression was expected of type
         string

I tried fixing this, but the library is doing a bunch of stuff with
actually overwriting strings, and I'm not clear how safe that is with
-safe-string.  Anyway, a fix isn't trivial.  Upstream parmap doesn't
have a fix that I could see.

Obviously I could switch to -unsafe-string, but has anyone fixed this?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

             reply	other threads:[~2017-11-17 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 19:03 Richard W.M. Jones [this message]
2017-11-17 19:40 ` [Cocci] Compiling with OCaml 4.06 / safe-string Julia Lawall
2017-11-18  0:33   ` Thierry Martinez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171117190307.GA26286@redhat.com \
    --to=rjones@redhat.com \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.