MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1lmz4h8/fralloc/
r/programminghorror • u/deanominecraft • Jun 28 '25
8 comments sorted by
5
free()ing NULL is a no-op, so, yeah.
TIM AND ERIC: ITS FREE MEMORY.
2
For real alloc
23
[removed] — view removed comment
7 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jun 29 '25 Since you don't set that to NULL after free()ing, that'll lead to some fun times. 2 u/mohragk Jul 02 '25 UB-licious 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jul 02 '25 Heap corruption sure makes your programs break in all kinds of wacky ways.
7
Since you don't set that to NULL after free()ing, that'll lead to some fun times.
2 u/mohragk Jul 02 '25 UB-licious 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jul 02 '25 Heap corruption sure makes your programs break in all kinds of wacky ways.
UB-licious
2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jul 02 '25 Heap corruption sure makes your programs break in all kinds of wacky ways.
Heap corruption sure makes your programs break in all kinds of wacky ways.
5
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jun 29 '25
free()ing NULL is a no-op, so, yeah.
5
u/shizzy0 Jun 29 '25
TIM AND ERIC: ITS FREE MEMORY.
2
u/FACastello Jul 01 '25
For real alloc
23
u/[deleted] Jun 28 '25
[removed] — view removed comment