From: Blair Zajac <blair@orcaware.com>
To: Caml Users Mailing List <caml-list@inria.fr>
Subject: [Caml-list] Ocaml and Samba function name collisions
Date: Mon, 24 Nov 2003 16:31:24 -0800 [thread overview]
Message-ID: <3FC2A2DC.F73593F3@orcaware.com> (raw)
In-Reply-To: <20031124095952.GE25688@redhat.com>
Hello,
The synopsis of this message is to ask that the Ocaml source
code prepend a Ocaml specific string, "ml_", "caml_" or "ocaml_"
to all function names in Ocaml's source code to avoid name
collisions with other packages. My case is made below :)
I'm using mod_caml and mod_smbauth in an Apache 1 process.
mod_smbauth is used to authenticate access to the web server
using our ActiveDirectory server.
http://www.tekrat.com/smbauth.php
When mod_caml.so is enabled in Apache httpd's conf file, it
core dumps with this stack backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1075767456 (LWP 3544)]
0x40b8a9cc in string_init (dest=0x40cb146c, src=0x1 <Address 0x1
out of bounds>) at lib/util_str.c:1142
1142 l = strlen(src);
(gdb) bt
#0 0x40b8a9cc in string_init (dest=0x40cb146c, src=0x1
<Address 0x1 out of bounds>) at lib/util_str.c:1142
#1 0x40b8ab21 in string_set (dest=0x1, src=0x0) at lib/util_str.c:1187
#2 0x40c34a4e in interprete () from
/opt/i386-linux/installed/apache-1.3.29-g/libexec/mod_caml.so
#3 0x40c265b1 in caml_main () from
/opt/i386-linux/installed/apache-1.3.29-g/libexec/mod_caml.so
#4 0x40c22ff4 in init () at mod_caml_c.c:80
#5 0x40c36975 in __do_global_ctors_aux () from
/opt/i386-linux/installed/apache-1.3.29-g/libexec/mod_caml.so
#6 0x40c20b95 in _init () from
/opt/i386-linux/installed/apache-1.3.29-g/libexec/mod_caml.so
...
Looking at the function names, both the Samba library and the
Ocaml source code have a function named string_set. It's odd
though that the function name is binding to the Samba function
in mod_smbauth.so instead of the name in mod_caml.so, but then
I'm not an expert in shared library binding.
% nm mod_caml.so | grep string_set
00019846 T string_set
% nm mod_smbauth.so | grep string_set
00052afe T string_set
000552f9 T string_set_w
Now this may be a bug that can be worked around, but given
Ocaml's popularity in being linked with other packages, it
seems like a good idea to put all the Ocaml names into their
own space via a prepend.
I'd be happy to do some of this work by submitting patches to
the appropriate people/mailing list for review. Let me know.
Best,
Blair
--
Blair Zajac <blair@orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next parent reply other threads:[~2003-11-25 0:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3FC174F5.13617AC8@orcaware.com>
[not found] ` <20031124095952.GE25688@redhat.com>
2003-11-25 0:31 ` Blair Zajac [this message]
2003-11-25 7:38 ` Stefano Zacchiroli
2003-11-25 7:52 ` Nicolas Cannasse
2003-11-25 12:55 ` Samuel Mimram
2003-11-25 14:32 ` Nicolas Cannasse
2003-11-26 7:17 ` Blair Zajac
2003-11-25 9:21 ` Richard Jones
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=3FC2A2DC.F73593F3@orcaware.com \
--to=blair@orcaware.com \
--cc=caml-list@inria.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox