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

Add asserts to dispatch tables #1524

Merged
merged 2 commits into from
Jul 24, 2017

Conversation

fingolfin
Copy link
Member

This removes some dead code, and adds assertions that help detect similar dead code.

First off, these set equality to be identity, which is the default anyway.
Secondly, these <EqFuncs> were never actually used anyway, because the ariths
kernel module gets initialized after the vars kernel module, and during that,
it resets <EqFuncs>.
This helps track down weird issues caused by a kernel module modifying a
dispatch table before the kernel module owning the dispatch table has
been initialized.

For example, the previous commit resolved such an issue for EqFuncs
and HVARS / LVARS.
@codecov
Copy link

codecov bot commented Jul 20, 2017

Codecov Report

Merging #1524 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1524      +/-   ##
==========================================
+ Coverage   64.19%   64.19%   +<.01%     
==========================================
  Files         992      992              
  Lines      322105   322148      +43     
  Branches    13064    13070       +6     
==========================================
+ Hits       206762   206814      +52     
+ Misses     112518   112513       -5     
+ Partials     2825     2821       -4
Impacted Files Coverage Δ
src/vars.c 72.68% <ø> (+0.04%) ⬆️
src/ariths.c 73.47% <100%> (+1.02%) ⬆️
src/hpc/traverse.c 79.38% <100%> (ø) ⬆️
src/objects.c 75.91% <100%> (+0.43%) ⬆️
src/records.c 63.03% <100%> (+0.89%) ⬆️
src/stringobj.c 76.69% <100%> (+0.02%) ⬆️
src/lists.c 54.82% <100%> (+1.14%) ⬆️
src/listfunc.c 76.95% <0%> (-0.18%) ⬇️
src/hpc/threadapi.c 31.27% <0%> (+0.09%) ⬆️
... and 3 more

@fingolfin fingolfin merged commit e8a20c4 into gap-system:master Jul 24, 2017
@fingolfin fingolfin deleted the mh/stricter-dispatch branch July 27, 2017 16:34
@fingolfin fingolfin added topic: kernel release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants