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

bug: Fix nil deref while handling changed files #157

Merged
merged 2 commits into from Jun 17, 2021
Merged

bug: Fix nil deref while handling changed files #157

merged 2 commits into from Jun 17, 2021

Conversation

charithe
Copy link
Contributor

@charithe charithe commented Jun 17, 2021

The directory watcher was not sending the contents of the changed policy
to the disk index when it detected a file system event. Because the
index was trying to access the non-existent policy data it was crashing
with a nil pointer deref.

This change includes the following:

  • A fix for the bug described above
  • Extra tests to exercise the directory watcher
  • Re-introduce Mockery to generate mocks

Fixes #156

The directory watcher was not sending the contents of the changed policy
to the disk index when it detected a file system event. Because the
index was trying to access the non-existent policy data it was crashing
with a nil pointer deref.

This change includes the following:
- A fix for the bug described above
- Extra tests to exercise the directory watcher
- Re-introduce Mockery to generate mocks
@charithe charithe added kind/bug Something isn't working area/testing labels Jun 17, 2021
@charithe charithe merged commit 4fac338 into cerbos:main Jun 17, 2021
@charithe charithe deleted the bug/dirwatch branch June 17, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nil pointer deref when file changes
1 participant