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

Fix Z(6,3) segfaulting, and incorrect spelling of "finfield.c" #1029

Merged
merged 2 commits into from
Dec 21, 2016

Conversation

fingolfin
Copy link
Member

The crash occurred because upon calling Z(q,d), the kernel function FuncZ2 simply computes q^d, and only checks whether it is less or equal 65536, but does not verify that it is a prime power. This is not so bad, as it next calls FiniteField, which actually catches this -- and return 0. But then FuncZ2 blindly passes that value to NEW_FFE, which returned an invalid FFE object. The segfault then happens once GAP tries to do anything with that object, e.g. print it to the user...

The other commit replaces finifield.c by finfield.c inside GVarFilts[], GVarFuncs[] and InitKernel(). These strings are printed if you do e.g. Display(Z) in GAP, and having a correct filename helps with quickly locating the source code... :)

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) labels Dec 20, 2016
@codecov-io
Copy link

codecov-io commented Dec 20, 2016

Current coverage is 49.46% (diff: 66.66%)

Merging #1029 into master will decrease coverage by 0.04%

@@             master      #1029   diff @@
==========================================
  Files           424        424          
  Lines        223266     223268     +2   
  Methods        3430       3430          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits         110545     110446    -99   
- Misses       112721     112822   +101   
  Partials          0          0          

Powered by Codecov. Last update 05829fe...ae23c1a

@olexandr-konovalov olexandr-konovalov added this to the GAP 4.9.0 milestone Dec 20, 2016
@olexandr-konovalov
Copy link
Member

Both changes are useful and tests passed - I will just wait in case anyone else would like to comment.

@markuspf markuspf merged commit d3baa77 into gap-system:master Dec 21, 2016
@fingolfin fingolfin deleted the mh/finfield branch January 6, 2017 22:32
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants