profanity icon indicating copy to clipboard operation
profanity copied to clipboard

Add custom `assert()` (`PROF_ASSERT()`)

Open H3rnand3zzz opened this issue 1 year ago • 4 comments

See commit message.

Valgrind not needed in this case.

How to test the functionality

  • Cause assert failure or add custom assert that will certainly fail.

Resolve #1895

H3rnand3zzz avatar Nov 12 '23 18:11 H3rnand3zzz

@jubalh @sjaeckel @pasis, if someone kindly can find a time to review it, it would be amazing.

H3rnand3zzz avatar Dec 15 '23 13:12 H3rnand3zzz

Personally I fail to see the reason for it. For this reason, plus pasis being the author of pppoat2, I thought it's best if pasis and sjaeckel review it.

jubalh avatar Dec 15 '23 13:12 jubalh

Personally I fail to see the reason for it. For this reason, plus pasis being the author of pppoat2, I thought it's best if pasis and sjaeckel review it.

The reason is on plain site: to make debugging easier. If someone has assert problem, he can provide profanity.log containing a line that shows where the problem has happened. Otherwise we need coredump, which not all the users can provide.

H3rnand3zzz avatar Dec 15 '23 14:12 H3rnand3zzz

That's exactly what I mean. For me it is default that under Linux we check things using gdb, get backtrace, receive a coredump from users. For me this and https://profanity-im.github.io/issues.html seems to be enough and seems to be the standard way in the Linux world. So for me it is not visible why we need this and what downsides it could bring. Which is why I will let someone else review it :)

jubalh avatar Dec 15 '23 14:12 jubalh

Not a big fan of this. And since noone else reviewed yet I'll close.

jubalh avatar Mar 21 '24 12:03 jubalh