Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Fix postgres crash due to array indexing issue #20

Merged
merged 3 commits into from
Nov 10, 2016
Merged

Fix postgres crash due to array indexing issue #20

merged 3 commits into from
Nov 10, 2016

Conversation

kriswehner
Copy link

This fixes #17

The problem was the natt iteration variable was being used as an array index, but it can skip outside the bounds of the array, which was ultimately causing a crash inside the protobuf assertion mechanisms that were detecting the memory error.

I've also moved the write outside the release of the memory context, which makes the output plugin consistent with all the other output plugins I can find, though I don't know if ultimately it matters.

@kriswehner
Copy link
Author

Dry'd up the code and commented as per internal CR feedback.

@gbrail gbrail merged commit eff5fa4 into apigee-labs:master Nov 10, 2016
@gbrail
Copy link
Contributor

gbrail commented Nov 10, 2016

Works great. Thanks!

@kriswehner kriswehner deleted the fix/array-index-pg-crash branch November 10, 2016 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres crash in 9.5.4 once replication is fully caught up
2 participants