Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make line editing resilient to LineEditKeyHandler failure #1856

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

fingolfin
Copy link
Member

Specifically, if the LineEditKeyHandler returns nothing (e.g. due to an
Error()), or if it returns something that isn't a list, or a list of the wrong
size, then just ignore this, instead of running into segfaults.

This addresses one part of issue #1853

Also remove superfluous "else {" and "}" when HAVE_LIBREADLINE is set.

Specifically, if the LineEditKeyHandler returns nothing (e.g. due to an
Error()), or if it returns something that isn't a list, or a list of the wrong
size, then just ignore this, instead of running into segfaults.

This addresses one part of issue gap-system#1853

Also remove superfluous "else {" and "}" when HAVE_LIBREADLINE is set.
@fingolfin fingolfin added the kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) label Nov 6, 2017
@codecov
Copy link

codecov bot commented Nov 6, 2017

Codecov Report

Merging #1856 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1856      +/-   ##
==========================================
+ Coverage   63.12%   63.13%   +<.01%     
==========================================
  Files         967      967              
  Lines      290318   290318              
  Branches    12746    12722      -24     
==========================================
+ Hits       183269   183279      +10     
+ Misses     104248   104241       -7     
+ Partials     2801     2798       -3
Impacted Files Coverage Δ
src/sysfiles.c 30.45% <0%> (-0.03%) ⬇️
src/funcs.c 74.75% <0%> (ø) ⬆️
src/stats.c 79.29% <0%> (+0.13%) ⬆️
src/gap.c 60.48% <0%> (+0.16%) ⬆️
hpcgap/lib/hpc/stdtasks.g 38.87% <0%> (+0.25%) ⬆️
src/hpc/threadapi.c 34.21% <0%> (+0.28%) ⬆️
src/hpc/traverse.c 78.29% <0%> (+0.3%) ⬆️
src/hpc/thread.c 46.04% <0%> (+0.59%) ⬆️

@fingolfin fingolfin merged commit ec2a402 into gap-system:master Nov 6, 2017
@fingolfin fingolfin deleted the mh/fix-noreadline branch November 7, 2017 16:26
@fingolfin fingolfin added release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes and removed release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Dec 13, 2017
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 22, 2018
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants