[#18440] racc segv revisited — "Akinori MUSHA" <knu@...>

 次のバグの件なんですが、現時点では原因究明を含めて未解決という

24 messages 2002/10/02
[#18617] Re: racc segv revisited — "Akinori MUSHA" <knu@...> 2002/11/02

At Wed, 2 Oct 2002 23:19:59 +0900,

[ruby-dev:18526] Forward: Patch for MacOS X dln.c

From: matz@... (Yukihiro Matsumoto)
Date: 2002-10-15 15:13:07 UTC
List: ruby-dev #18526
まつもと ゆきひろです

こんどはMac OS Xについてです。
うーん、よくわからない。

------- Start of forwarded message -------
Posted: Sun, 13 Oct 2002 16:35:24 -0400
From: Luc Blanger <belanglu@iro.umontreal.ca>
Subject: Patch for MacOS X dln.c
To: ruby-core-ctl@ruby-lang.org
X-ML-Name: ruby-core
X-Mail-Count: 00541


- --Apple-Mail-11-404121901
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

I have a patch for the dynamic linker in MacOS X, which permit to load 
the extension bundle linked dynamically against optional library 
(libiconv, readline and gdbm). The Patch is not from me, but from 
"Peter O'Gorman" <peter@pogma.com>. We worked around the issue when I 
tried to import the ruby 1.7 dev version in the darwinport tree.

The patch is in attachment and is included in the message.


- --- dln.c	Sat Oct 12 21:20:36 2002
+++ dln.c	Sat Oct 12 21:34:36 2002
@@ -90,7 +90,7 @@

  int eaccess();

- -#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX)
+#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) 
&& !defined(__APPLE__)
  /* dynamic load with dlopen() */
  # define USE_DLN_DLOPEN
  #endif
@@ -1430,10 +1430,14 @@

  	/* lookup the initial function */
  	/*NSIsSymbolNameDefined require function name without "_" */
- -	if(NSIsSymbolNameDefined(buf + 1)) {
+/*	if(NSIsSymbolNameDefined(buf + 1)) {
  	    rb_loaderror("Failed to lookup Init function %.200s",file);
  	}
- -
+	Yeah, right, it helps if you use the right test...
+*/
+	if(!NSIsSymbolNameDefined(buf)) {
+	    rb_loaderror("Failed to lookup Init function %.200s",file);
+	}	
  	/* NSLookupAndBindSymbol require function name with "_" !! */
  	init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf));
  	(*init_fct)();




- --Apple-Mail-11-404121901
Content-Disposition: attachment;
	filename=patch-dln.c
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	x-unix-mode=0644;
	name="patch-dln.c"

- --- dln.c	Sat Oct 12 21:20:36 2002
+++ dln.c	Sat Oct 12 21:34:36 2002
@@ -90,7 +90,7 @@
 
 int eaccess();
 
- -#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX)
+#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__)
 /* dynamic load with dlopen() */
 # define USE_DLN_DLOPEN
 #endif
@@ -1430,10 +1430,14 @@
 
 	/* lookup the initial function */
 	/*NSIsSymbolNameDefined require function name without "_" */
- -	if(NSIsSymbolNameDefined(buf + 1)) {
+/*	if(NSIsSymbolNameDefined(buf + 1)) {
 	    rb_loaderror("Failed to lookup Init function %.200s",file);
 	}
- -
+	Yeah, right, it helps if you use the right test...
+*/
+	if(!NSIsSymbolNameDefined(buf)) {
+	    rb_loaderror("Failed to lookup Init function %.200s",file);
+	}	
 	/* NSLookupAndBindSymbol require function name with "_" !! */
 	init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf));
 	(*init_fct)();

- --Apple-Mail-11-404121901
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed


- --
Luc Belanger	(450) 773-2649
luc.belanger@acm.org <luc.belanger@acm.org>
- --
Luc Belanger	(450) 773-2649
luc.belanger@acm.org <luc.belanger@acm.org>
- --Apple-Mail-11-404121901--



------- End of forwarded message -------

In This Thread

Prev Next