From owner-freebsd-questions@FreeBSD.ORG Sat Mar 19 20:26:51 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E61416A4CE for ; Sat, 19 Mar 2005 20:26:51 +0000 (GMT) Received: from orac.acorntoolworks.com (adsl-66-123-74-10.dsl.pltn13.pacbell.net [66.123.74.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A53643D1D for ; Sat, 19 Mar 2005 20:26:49 +0000 (GMT) (envelope-from jtc@acorntoolworks.com) Received: from orac.acorntoolworks.com (localhost [127.0.0.1]) j2JKQnX9018220 for ; Sat, 19 Mar 2005 12:26:49 -0800 (PST) Received: (from jtc@localhost) by orac.acorntoolworks.com (8.12.11/8.12.11) id j2JKQn6t016039; Sat, 19 Mar 2005 12:26:49 -0800 (PST) To: freebsd-questions@freebsd.org From: jtc@acorntoolworks.com (J.T. Conklin) Date: Sat, 19 Mar 2005 12:26:49 -0800 Message-ID: <87k6o3756e.fsf@orac.acorntoolworks.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: FreeBSD equivalent for SEGV_MAPERR? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jtc@acorntoolworks.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2005 20:26:51 -0000 I'm working on autoconf support for ACE (A C++ framework) and TAO (Real-time CORBA ORB). The resulting configuration is failing for FreeBSD, something I'd like before the upcoming ACE/TAO release. I downloaded FreeBSD 5.3 and installed it under vmware to reproduce (and hopefully fix) this problem. The configure script detects that FreeBSD supports SA_SIGINFO, the siginfo_t struct, and the fact siginfo_t has a si_addr field so it enables code to check for segmentation errors in the shared memory pool class. But that fails to compile due to the lack of a SEGV_MAPERR macro. The code in question is: else if (!(siginfo->si_code == SEGV_MAPERR && siginfo->si_addr < (((char *) this->base_addr_) + offset) && siginfo->si_addr >= ((char *) this->base_addr_))) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) address %u out of range\n", siginfo->si_addr), -1); I wrote a little test program to force a SIGSEGV, and si_addr seems to have the correct value. But I don't know what macro/constant I should be checking si_code against. --jtc -- J.T. Conklin