foyer icon indicating copy to clipboard operation
foyer copied to clipboard

using static check to ignore memory bug and darling pointer

Open yihong0618 opened this issue 10 months ago • 8 comments

Hi~

I just using rapx to check some of rust repo I interest

about rapx: https://github.com/Artisan-Lab/RAPx

doc: https://artisan-lab.github.io/RAPx-Book/1-intro.html

using:

first install rapx as doc

cd foyer
# then 

cargo +nightly-2024-10-12 rapx -mleak
cargo +nightly-2024-10-12 rapx -ops
cargo +nightly-2024-10-12 rapx -auf

the mleak and ops for foyer is good, but aux had some darling pointer and double free, I am that quick that's issues need to fix you can try it yourself

FYI: my patch using rapx fix

  • https://github.com/apache/opendal/pull/5554
  • https://github.com/GreptimeTeam/greptimedb/pull/5383
  • https://github.com/GreptimeTeam/greptimedb/pull/5388
  • https://github.com/GreptimeTeam/greptimedb/pull/5507

bonus:

I must say that foyer is the amazing one that rapx -ops did not find any code need to improve, really learned that.

@MrCroxx cc @Xuanwo @sunng87

@Xuanwo about opendal found a memory leak in the check, I am also not sure need to fix, so leave comment here

yihong0618 avatar Feb 11 '25 13:02 yihong0618

@Xuanwo about opendal found a memory leak in the check, I am also not sure need to fix, so leave comment here

Cool, would you like to raise an issue for opendal?

Xuanwo avatar Feb 11 '25 14:02 Xuanwo

@Xuanwo about opendal found a memory leak in the check, I am also not sure need to fix, so leave comment here

Cool, would you like to raise an issue for opendal?

Done

yihong0618 avatar Feb 11 '25 14:02 yihong0618

Thank you for letting me know about another cool tool! 🤩

Let me check it.

MrCroxx avatar Feb 11 '25 16:02 MrCroxx

It caused an ICE on my Linux machine with uaf. 🥹 Could you please provide the platform you are running?

MrCroxx avatar Feb 11 '25 16:02 MrCroxx

It caused an ICE on my Linux machine with uaf. 🥹 Could you please provide the platform you are running?

mine is Mac m3

Sorry I forget maybe you need use my patch https://github.com/Artisan-Lab/RAPx/issues/94 ? Will check Linux today too

yihong0618 avatar Feb 11 '25 21:02 yihong0618

Checked you can use my patch to make it work

yihong0618 avatar Feb 11 '25 22:02 yihong0618

It caused an ICE on my Linux machine with uaf. 🥹 Could you please provide the platform you are running?

mine is Mac m3

Sorry I forget maybe you need use my patch Artisan-Lab/RAPx#94 ? Will check Linux today too

sorry patch link is wrong.... https://github.com/Artisan-Lab/RAPx/pull/95

yihong0618 avatar Feb 14 '25 02:02 yihong0618

It caused an ICE on my Linux machine with uaf. 🥹 Could you please provide the platform you are running?

mine is Mac m3 Sorry I forget maybe you need use my patch Artisan-Lab/RAPx#94 ? Will check Linux today too

sorry patch link is wrong.... Artisan-Lab/RAPx#95

merged

yihong0618 avatar Feb 17 '25 02:02 yihong0618