Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Jul 2006 18:21:06 -0700
From:      "Philip M. Gollucci" <pgollucci@p6m7g8.com>
To:        Paul Querna <chip@force-elite.com>
Cc:        questions@freebsd.org, dev@perl.apache.org, dev@httpd.apache.org
Subject:   Re: gdb in realloc(): error: junk pointer, too high to make sense on FreeBSD 5.2+
Message-ID:  <44A9C282.9090606@p6m7g8.com>
In-Reply-To: <44A8BB0E.6070004@force-elite.com>
References:  <44A88EBD.80407@p6m7g8.com> <44A8BB0E.6070004@force-elite.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030102000904010701050308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Paul Querna wrote:
> Can you try to get this into a simple test case? Calling apr_dso_load twice?
I didn't seem to be able to cause it in a simple case; any great ideas ?

gcc -g -O0 \
	-I/usr/local/software/freebsd-6.1-stable/3.4.4/apr/trunk/include/apr-1 \
	-L/usr/local/software/freebsd-6.1-stable/3.4.4/apr/trunk/lib -l apr-1 \
	gdb.c -o test
./test

pgollucci@home.p6m7g8.net /home/pgollucci 145 0>gdb ./test
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) r
Starting program: /usr/home/pgollucci/test
warning: Unable to get location for thread creation breakpoint: generic error
[New LWP 100062]
[New Thread 0x8053000 (LWP 100062)]

Program exited normally.
(gdb)

------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

--------------030102000904010701050308
Content-Type: text/plain;
 name="gdb.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdb.c"

/* $Id$ */

#include "apr.h"
#include "apr_dso.h"

#include <stdio.h>

int main(int argc, const char * const argv[]) {

  apr_pool_t *cntx;
  apr_status_t stat;
  apr_dso_handle_t *modhandle;
  const char *path = "/lib/libc.so.6";

  apr_app_initialize(&argc, &argv, NULL);

  stat = apr_pool_create(&cntx, NULL);
  if (stat != APR_SUCCESS) {
    fprintf(stderr, "apr_pool_create() failed to create initial context");
    apr_terminate();
    exit(1);
  }

  if (apr_dso_load(&modhandle, path, cntx) != APR_SUCCESS) {
    char my_error[256];
    fprintf(stderr, apr_dso_error(modhandle, my_error, sizeof(my_error)));
  }

  if (apr_dso_load(&modhandle, path, cntx) != APR_SUCCESS) {
    char my_error[256];
    fprintf(stderr, apr_dso_error(modhandle, my_error, sizeof(my_error)));
  }

  apr_terminate();
  exit(0);
}


--------------030102000904010701050308--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44A9C282.9090606>