Re: Making PostgreSQL 7.4 (CVS) work properly on OS X 10.3 (7B85)

From: Bob Ippolito <bob(at)redivi(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Making PostgreSQL 7.4 (CVS) work properly on OS X 10.3 (7B85)
Date: 2003-11-08 06:47:27
Message-ID: 6A96515D-11B7-11D8-92AB-000A95686CD8@redivi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Nov 8, 2003, at 1:00 AM, Tom Lane wrote:

> Bob Ippolito <bob(at)redivi(dot)com> writes:
>> On Nov 8, 2003, at 12:31 AM, Tom Lane wrote:
>>> I have just in the past couple hours realized that ps_status.c is
>>> seriously broken on OS X 10.3. It appears that Apple has randomly
>>> decided to start #define'ing "BSD",
>
>> __APPLE__ is usually the only define you should really be depending on
>
> It is not that we are failing to recognize Darwin, it is that Darwin is
> falsely claiming to be something else.
>
>>> I don't see why system.c would affect the problem I'm seeing --- does
>>> this really fix pltcl for you?
>
>> If you're getting the NSLinkModule -> mmap crash, then yes.
>
> No, I'm seeing an NSLinkModule -> memcmp crash. memcmp() is crashing
> because it is being passed a null pointer, and the pointer in question
> is null because ps_status.c zeroed it via "argv[1] = NULL".
>
> I modified ps_status to use the correct status update method
> (PS_CLOBBER_ARGV) but it still failed :-(. It sorta looks like
> something in the dynamic loader may be relying on a stale copy of
> the "environ" pointer ... does that ring a bell at all?

Er... I meant memcmp.. Have you tried removing the system.c hack?
That's what fixed it for me. I'm pretty sure that the multiply defined
_system is messing with things. Is it possible to use execve to
rewrite argv[0]? I've had better luck with that.

-bob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2003-11-08 08:37:53 Re: [PATCHES] initdb in C
Previous Message Christopher Kings-Lynne 2003-11-08 06:44:00 Re: bugzilla (Was: What do you want me to do?)