844
submitted 2 months ago by BlueKey@fedia.io to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Quacksalber@sh.itjust.works 153 points 2 months ago

Aren't those almost always race condition bugs? The debugger slows execution, so the bug won't appear when debugging.

[-] anhkagi@jlai.lu 9 points 2 months ago

sometimes it's also bugs caused by optimizations.

[-] xthexder@l.sw0.com 2 points 2 months ago

And that's where Release with debug symbols comes in. Definitely harder to track down what's going on when it skips 10 lines of code in one step though. Usually my code ends up the other way though, because debug mode has extra assertions to catch things like uninitialized memory or access-after-free (I think specifically MSVC sets memory to 0xcdcdcdcd on free in debug mode).

load more comments (10 replies)
this post was submitted on 03 Sep 2024
844 points (100.0% liked)

Programmer Humor

32480 readers
236 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS