Skip to content

[3.6] bpo-29854 Backport for 3.6#2633

Merged
berkerpeksag merged 2 commits into
python:3.6from
nirs:bpo-29854-3.6
Jul 8, 2017
Merged

[3.6] bpo-29854 Backport for 3.6#2633
berkerpeksag merged 2 commits into
python:3.6from
nirs:bpo-29854-3.6

Conversation

@nirs
Copy link
Copy Markdown
Contributor

@nirs nirs commented Jul 8, 2017

Backport the related patches for this bug to 3.6.

@berkerpeksag, @Haypo this will merge the related patches into one patch in 3.6, is this the way we backport patches?

If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
@nirs nirs changed the title Bpo 29854 3.6 bpo-29854 Backport for 3.6 Jul 8, 2017
@berkerpeksag
Copy link
Copy Markdown
Member

Yes, this is the correct way to backport multiple PRs that are related to the same issue.

I think we can skip backporting 6618e1fc8e2f06a13407c26b47a29b4777f845b5 for now. It was mainly merged to debug the test failure that we already fixed in 76dde7df682a7753e3e5ae38b2c9da872c3dfae2.

@Mariatta Mariatta changed the title bpo-29854 Backport for 3.6 [3.6] bpo-29854 Backport for 3.6 Jul 8, 2017
@Mariatta
Copy link
Copy Markdown
Member

Mariatta commented Jul 8, 2017

I added [3.6] to the title :)

Turns out that history-size was added in readline 6.0. This explain why
this tests fail on FreeBSD when using readline 5.2. We skip now the
history size if readline does not support it.

See https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES for
details.
@nirs nirs force-pushed the bpo-29854-3.6 branch from 76dde7d to 4cbde07 Compare July 8, 2017 16:54
@nirs
Copy link
Copy Markdown
Contributor Author

nirs commented Jul 8, 2017

Changes in version 2:

  • remove 6618e1f (berkerpeksag)

Thanks for fixing the title @Mariatta.

@berkerpeksag berkerpeksag merged commit 04f77d4 into python:3.6 Jul 8, 2017
@berkerpeksag
Copy link
Copy Markdown
Member

Thanks, @nirs!

@nirs nirs deleted the bpo-29854-3.6 branch October 1, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants