pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Logan O'Sullivan Bruns <logan@gedanken.org>
To: pgsql-ports@postgresql.org
Subject: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
Date: Wed, 3 Aug 2005 17:03:56 -0700
Message-ID: <20050804000356.GL5788@pravda.gedanken.org> (raw)

Hello everyone,

I ran into a minor bug with PostgreSQL 8.0.3 compiled with xlc on AIX
5.1 (5100-04). Basically it worked fine connecting via unix domain
sockets but when you connected to it using TCP/IP with JDBC the child
process would SEGV. I tracked the problem to a call to getaddrinfo
while evaluating the host based access control rules.

The code in function parse_hba on line 752 of hba.c sets the ai_flags
member of the addrinfo struct to AI_NUMERICHOST. This is eventually
passed into a call to getaddrinfo that results in the SEGV. The manual
page from the box implies that at least this version of AIX does not
the AI_NUMERICHOST flag. (As opposed to, say, Solaris which clearly
does.)

Ifdefing the code so that ai_flags is set to zero on AIX fixes the
problem.

Anyway, I hope this is helpful to someone or the right place to send
such notes. Please let me know if you need any additional information.

Thanks,
  logan




view thread (7+ messages)  latest in thread

Message-ID: <20050804000356.GL5788@pravda.gedanken.org>
Permalink:  ../20050804000356.GL5788@pravda.gedanken.org/
Also on:    postgresql.org/message-id/20050804000356.GL5788@pravda.gedanken.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-ports@postgresql.org
  Cc: logan@gedanken.org
  Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
  In-Reply-To: <20050804000356.GL5788@pravda.gedanken.org>
  References: <20050804000356.GL5788@pravda.gedanken.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox