From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA23821; Tue, 25 Nov 2003 01:31:29 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA23396 for ; Tue, 25 Nov 2003 01:31:28 +0100 (MET) Received: from orcaware.com (bdsl.66.12.233.174.gte.net [66.12.233.174]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAP0VQ110273 for ; Tue, 25 Nov 2003 01:31:26 +0100 (MET) Received: from orcaware.com (localhost.localdomain [127.0.0.1]) by orcaware.com (8.12.8/8.12.8) with ESMTP id hAP0VO7N017319; Mon, 24 Nov 2003 16:31:24 -0800 Message-ID: <3FC2A2DC.F73593F3@orcaware.com> Date: Mon, 24 Nov 2003 16:31:24 -0800 From: Blair Zajac X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Caml Users Mailing List Subject: [Caml-list] Ocaml and Samba function name collisions References: <3FC174F5.13617AC8@orcaware.com> <20031124095952.GE25688@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; blair:01 zajac:01 blair:01 orcaware:01 prepend:01 ocaml's:01 authenticate:99 backtrace:01 sigsegv:01 lwp:01 util:01 strlen:01 gdb:01 util:01 -linux:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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
) at lib/util_str.c:1142 1142 l = strlen(src); (gdb) bt #0 0x40b8a9cc in string_init (dest=0x40cb146c, src=0x1
) 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 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