MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6v5pkt/?context=3
r/ProgrammerHumor • u/ClipboardCopyPaste • 2d ago
120 comments sorted by
View all comments
Show parent comments
117
De-referenced a pointer after freeing it. But the joke here is that the bug was not in the original code.
0 u/WisestAirBender 2d ago The original code wasn't returning anything though. Isn't that a problem -5 u/critical_patch 2d ago AFAIK technically it’s “undefined behavior” and will compile just fine 18 u/MegaIng 2d ago main specifically is allowed to not return anything (the same way it's the one function that is allowed to never return)
0
The original code wasn't returning anything though. Isn't that a problem
-5 u/critical_patch 2d ago AFAIK technically it’s “undefined behavior” and will compile just fine 18 u/MegaIng 2d ago main specifically is allowed to not return anything (the same way it's the one function that is allowed to never return)
-5
AFAIK technically it’s “undefined behavior” and will compile just fine
18 u/MegaIng 2d ago main specifically is allowed to not return anything (the same way it's the one function that is allowed to never return)
18
main specifically is allowed to not return anything (the same way it's the one function that is allowed to never return)
main
117
u/mckenzie_keith 2d ago
De-referenced a pointer after freeing it. But the joke here is that the bug was not in the original code.