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 Ensure to fix coverity defect #7338

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

kpan2034
Copy link
Contributor

@kpan2034 kpan2034 commented Oct 11, 2024

Coverity detected a possible null pointer dereference. It doesn't seem like this can be triggered, so added an Ensure clause.

Disable-check: force-changelog-file

@kpan2034 kpan2034 self-assigned this Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.59%. Comparing base (59f50f2) to head (42c22ad).
Report is 560 commits behind head on main.

Files with missing lines Patch % Lines
src/import/ht_hypertable_modify.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7338      +/-   ##
==========================================
+ Coverage   80.06%   82.59%   +2.52%     
==========================================
  Files         190      229      +39     
  Lines       37181    42727    +5546     
  Branches     9450    10734    +1284     
==========================================
+ Hits        29770    35290    +5520     
- Misses       2997     3159     +162     
+ Partials     4414     4278     -136     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 463 to 468
#if PG17_GE
if (oldtuple != NULL)
ExecForceStoreHeapTuple(oldtuple, resultRelInfo->ri_oldTupleSlot,
false);
else
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this added? This commit only talks about adding an Ensure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to match upstream. Let me mention this in the commit message as well for clarity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... Even those are very simple changes I think it should be splitted into two different PRs:

  1. with the coverity fix
  2. with the upstream stuff adding proper PG17 label (it is good to have it separately for future checks)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've split this into two PRs.

@kpan2034 kpan2034 force-pushed the coverity-fix branch 2 times, most recently from c9aa746 to 6c49b66 Compare October 11, 2024 17:02
Coverity detected a possible null pointer dereference. It doesn't seem
like this can be triggered, so added an `Ensure` clause.
@kpan2034 kpan2034 enabled auto-merge (squash) October 21, 2024 19:07
@kpan2034 kpan2034 merged commit 3834d81 into timescale:main Oct 21, 2024
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants