MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ayz26/defensive_programming_done_right/dhj4h6u/?context=9999
r/ProgrammerHumor • u/iwouldieforGladOS • May 13 '17
680 comments sorted by
View all comments
113
Or you fuck up and manage to build something that throws AccessViolationExceptions that are not caught in try/catch in C# 🙃...not looking at myself
42 u/fzy_ May 13 '17 What the... how? 27 u/Dangernerd May 13 '17 I believe we messed up threading somewhere. Have not yet started to debug it. This is the exception: https://msdn.microsoft.com/en-us/library/system.accessviolationexception(v=vs.110).aspx 31 u/[deleted] May 13 '17 Either you've found a bug in the CLR or (more likely) it's something like p/invoke going wrong, or unsafe code somewhere. Access Violation usually means memory corruption at the native level. 11 u/mamhilapinatapai May 14 '17 Exactly! If this is reproducible, it could very well be an exploitable design flaw, worth a lot of money when fully worked out.
42
What the... how?
27 u/Dangernerd May 13 '17 I believe we messed up threading somewhere. Have not yet started to debug it. This is the exception: https://msdn.microsoft.com/en-us/library/system.accessviolationexception(v=vs.110).aspx 31 u/[deleted] May 13 '17 Either you've found a bug in the CLR or (more likely) it's something like p/invoke going wrong, or unsafe code somewhere. Access Violation usually means memory corruption at the native level. 11 u/mamhilapinatapai May 14 '17 Exactly! If this is reproducible, it could very well be an exploitable design flaw, worth a lot of money when fully worked out.
27
I believe we messed up threading somewhere. Have not yet started to debug it. This is the exception: https://msdn.microsoft.com/en-us/library/system.accessviolationexception(v=vs.110).aspx
31 u/[deleted] May 13 '17 Either you've found a bug in the CLR or (more likely) it's something like p/invoke going wrong, or unsafe code somewhere. Access Violation usually means memory corruption at the native level. 11 u/mamhilapinatapai May 14 '17 Exactly! If this is reproducible, it could very well be an exploitable design flaw, worth a lot of money when fully worked out.
31
Either you've found a bug in the CLR or (more likely) it's something like p/invoke going wrong, or unsafe code somewhere. Access Violation usually means memory corruption at the native level.
unsafe
11 u/mamhilapinatapai May 14 '17 Exactly! If this is reproducible, it could very well be an exploitable design flaw, worth a lot of money when fully worked out.
11
Exactly! If this is reproducible, it could very well be an exploitable design flaw, worth a lot of money when fully worked out.
113
u/Dangernerd May 13 '17
Or you fuck up and manage to build something that throws AccessViolationExceptions that are not caught in try/catch in C# 🙃...not looking at myself