CXXGraph icon indicating copy to clipboard operation
CXXGraph copied to clipboard

Add nullptr guard-check in comparision of shared ptr node and edge

Open badumbatish opened this issue 1 year ago • 4 comments

Fixes Clang's critical bug on the library where we're doing custom shared_ptr comparison with potentially null ptrs.

This will fix #433 but i think what we should also be doing is enforce nullptr safety on these custom operators on shared ptrs

This allows Clang on MacOS to pass all tests.

  • A description of the changes proposed in the pull request. I added
...
  if (p1 == nullptr && p2 == nullptr) return true;
  if (p1 == nullptr || p2 == nullptr) return false;
...

to == operator in PointerHash()

@ZigRazor would love a review

badumbatish avatar May 13 '24 07:05 badumbatish

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.87%. Comparing base (1b31e63) to head (80e69fd). Report is 25 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #436      +/-   ##
==========================================
+ Coverage   97.58%   97.87%   +0.28%     
==========================================
  Files          87       87              
  Lines        9492    10063     +571     
  Branches        0      670     +670     
==========================================
+ Hits         9263     9849     +586     
+ Misses        229      214      -15     
Flag Coverage Δ
unittests 97.87% <100.00%> (+0.28%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 13 '24 07:05 codecov[bot]

We are waiting the re-liensing #427, after that we can merge it!

ZigRazor avatar May 13 '24 07:05 ZigRazor

how should i pass the rest of the tests on ci/cd ? @ZigRazor

badumbatish avatar May 13 '24 07:05 badumbatish

how should i pass the rest of the tests on ci/cd ? @ZigRazor

The only one you can pass is the clang format, just formatting with clang. @badumbatish The ore CI/CD should be fix, now aren't working

ZigRazor avatar May 13 '24 07:05 ZigRazor