Nmap Development mailing list archives

Re: SIGSEGV signal on Darwin OS X (Intel) when using version matching (nmap 4.01)


From: "Kurt Grutzmacher" <grutz () jingojango net>
Date: Fri, 10 Mar 2006 12:56:14 -0800

On 3/10/06, Fyodor <fyodor () insecure org> wrote:

Great!  If this is related to a coding problem in Nmap or one if its
libraries, then it would be best to fix that underlying issue.  One
the other hand, it may be a bug in this gcc optimization, at least on
that platform.  So unless anyone has ideas about changes to Nmap or
its libraries to resolve this, the best approach may be adding
-fno-thread-jumps on the X86 Apple platform.  Do you think you could
send a patch to the configure.ac files which adds that flag?


This seemed to work well. libpcre doesn't seem to use CXXFLAGS so it's just
appended to CFLAGS and the AC_CANNONICAL_HOST macro comes back as
i386-apple-darwin8 for some strange reason. Otherwise right as rain:

--- ../nmap-4.02Alpha2.orig/libpcre/configure.ac        2006-03-10 12:48:
34.000000000 -0800
+++ libpcre/configure.ac        2006-03-10 12:49:33.000000000 -0800
@@ -169,6 +169,18 @@
   UTF8=-DSUPPORT_UTF8
 fi

+dnl MacOSX on Intel Hack to remove thread-jumps
+AC_CANONICAL_HOST
+
+case "$host" in
+  i386-apple-darwin*)
+     macosx=yes
+     AC_DEFINE(MACOSX)
+     needs_cpp_precomp=yes
+     CFLAGS="$CFLAGS -fno-thread-jumps"
+     ;;
+esac
+
 dnl "Export" these variables

 AC_SUBST(BUILD_EXEEXT)
@@ -191,6 +203,7 @@
 AC_SUBST(POSIX_MALLOC_THRESHOLD)
 AC_SUBST(UCP)
 AC_SUBST(UTF8)
+AC_SUBST(CFLAGS)

 AC_SUBST(POSIX_OBJ)
 AC_SUBST(POSIX_LOBJ)


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: