ZigRazor / CXXGraph

Header-Only C++ Library for Graph Representation and Algorithms
https://zigrazor.github.io/CXXGraph/
Mozilla Public License 2.0
472 stars 115 forks source link

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

Closed badumbatish closed 5 months ago

badumbatish commented 6 months ago

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.

to == operator in PointerHash()

@ZigRazor would love a review

codecov[bot] commented 6 months ago

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 ```diff @@ 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](https://app.codecov.io/gh/ZigRazor/CXXGraph/pull/436/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ZigRazor) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ZigRazor/CXXGraph/pull/436/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ZigRazor) | `97.87% <100.00%> (+0.28%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ZigRazor#carryforward-flags-in-the-pull-request-comment) to find out more.

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

ZigRazor commented 6 months ago

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

badumbatish commented 6 months ago

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

ZigRazor commented 6 months ago

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