Make null-checkes for mem* functions optional
Closed this issue · 1 comments
jvoisin commented
As reported on #chimera-linux:
19:00 <alice> heh
19:00 <alice> did you find more mem crashes
19:01 <@q66> no, but i know lots of stuff relies on memcpy allowing potentially null inputs when size is 0
19:01 <@q66> and i see absolutely no real reason to trap on that
19:01 <alice> ah
19:01 <@q66> maybe jvoisin can enlighten me
19:03 <@q66> jvoisin: i think even gcc itself relies on this
19:03 <@q66> for its builtin memcpy emit
19:03 <alice> same for clang
19:03 <alice> there was a long discussion somewhere...
19:03 <alice> dalias might've even been involved...
19:03 <alice> don't want to find it
19:04 <@q66> in any case production hardening == mitigating bad scenarios != being anal about code correctness
19:11 <@q66> jvoisin: i will research this a little more later but at this point this is "not safe to enable because it'll potentially break more than it'll fix" for me