Re: Function keys cause psql to segfault

From: Chris Travers <chris(at)travelamericas(dot)com>
To: Douglas McNaught <doug(at)mcnaught(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function keys cause psql to segfault
Date: 2005-09-28 17:57:49
Message-ID: 433AD99D.7000806@travelamericas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Douglas McNaught wrote:

>CSN <cool_screen_name90001(at)yahoo(dot)com> writes:
>
>
>
>>Hmm, in putty (Terminal->Keyboard) I changed "the
>>function keys and keypad" from "ESC[n~" to "Linux".
>>Hitting F1-5 in psql outputs "ABCDE" - no segfaults!
>>Setting it to "Xterm R6" also results in function keys
>>1-4 causing segfaults (there are also options for
>>"VT400", "VT100+", and "SCO" - haven't tried those).
>>
>>
>
>Sounds like it might be useful to compile psql with debugging symbols
>and get a backtrace from the crash.
>
>
Just an oddball theory:

Do we really know what data is being sent with the function keys from
XP? If Putty is doing passthrough encoding, this might be the problem.

The od output doesn't look right to me. One should try:
od -c
F1F2F3F4 ctrl-D
When I try this on a gterm, I get:
^[OQ^[OR^[OS0000000 033 O Q 033 O R 033 O S
0000011
My guess is that Windows is sending some data (maybe embedded nulls) in
the data from the Fn key sequences that is causing Readline to crash.

In that case it would be a readline bug not something correctable in
psql I'm afraid.

Best Wishes,
Chris Travers
Metatron Technology Consultingp

>-Doug
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rafael Montoya 2005-09-28 18:51:24 Hardware requirements
Previous Message codeWarrior 2005-09-28 16:55:51 Re: [PG7.4] Using the data from temp table within a function