kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.25k stars 296 forks source link

Swift runtime failure: arithmetic overflow #217

Closed SuperY closed 10 months ago

SuperY commented 1 year ago

Crash when the number of logs reaches a certain number, also crash immediately after the app restarts. https://github.com/kean/Pulse/blob/e080339a24f5a47461378e5fe02ba3f2ef0a2cfa/Sources/Pulse/LoggerStore/LoggerStore.swift#L626

Cretus-iosDev commented 12 months ago

hello @SuperY , like I have run the code and it is showing Build success. but not showing any output.

Like I want to work on this issue. so can you tell me what more should look in..?

I'm a beginner this is my second time contributing.. can guide me.

kean commented 12 months ago

Hey, @Cretus-iosDev. If you'd like to contribute, please check LoggerBlobHandleEntity/linkCount property. It currently uses Int16 to store values, which is too small, apparently. I would suggest using Int32 or even larger integers just to be safe. It may be worth reviewing other entities too.

kean commented 10 months ago

Fixed in https://github.com/kean/Pulse/commit/fcc72532cd488fadd1f4ec69614e3b41b041fa64 and will be released in the upcoming version.