trpc-group / trpc-cpp

A pluggable, high-performance RPC framework written in cpp
Other
280 stars 82 forks source link

BugFix: fix coredump of trpc::config::GetInt64() with overflowed int32 #89

Closed liucf3995 closed 11 months ago

liucf3995 commented 11 months ago

issue: trpc::config::GetInt64() with json may coredump when real value is greater than INT32_MAX. cause: asInt() of json-cpp with overflowed interge will assert failure. fix: change asInt() to asInt64().

github-actions[bot] commented 11 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

liucf3995 commented 11 months ago

I have read the CLA Document and I hereby sign the CLA

liucf3995 commented 11 months ago

close #88

codecov[bot] commented 11 months ago

Codecov Report

Merging #89 (737cf13) into main (f99f77d) will decrease coverage by 0.05862%. Report is 1 commits behind head on main. The diff coverage is 100.00000%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/trpc-group/trpc-cpp/pull/89/graphs/tree.svg?width=650&height=150&src=pr&token=7csQnBLsa9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group)](https://app.codecov.io/gh/trpc-group/trpc-cpp/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group) ```diff @@ Coverage Diff @@ ## main #89 +/- ## =================================================== - Coverage 81.79932% 81.74070% -0.05862% =================================================== Files 855 855 Lines 33746 33791 +45 =================================================== + Hits 27604 27621 +17 - Misses 6142 6170 +28 ``` | [Files](https://app.codecov.io/gh/trpc-group/trpc-cpp/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group) | Coverage Δ | | |---|---|---| | [trpc/config/trpc\_conf\_compatible.cc](https://app.codecov.io/gh/trpc-group/trpc-cpp/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group#diff-dHJwYy9jb25maWcvdHJwY19jb25mX2NvbXBhdGlibGUuY2M=) | `22.90503% <100.00000%> (+0.55865%)` | :arrow_up: | ... and [19 files with indirect coverage changes](https://app.codecov.io/gh/trpc-group/trpc-cpp/pull/89/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group)