4 ms·
> In fact that is what most modern compilers do by default in debug mode. Assuming that “debug mode” is -g or equivalent, then I have not seen a modern compile
by saagarjha 7y ago
> In fact that is what most modern compilers do by default in debug mode.
Assuming that “debug mode” is -g or equivalent, then I have not seen a modern compiler that does this.
- swiley 7y agoHe’s probably talking about instrumentation (valgrind, ASAN etc.) That’s part of why running instrumented code feels like running python.
- pjmlp 7y agoNo, just plain bounds checking on C++ standard library and integration with hardware memory tagging when available.
- pjmlp 7y agoThen get to use Visual C++, which does bounds checking on collection types (array, string, vector,...), memory dumps leaks at exit. Or Solaris SPARC and iOS compilers that make use of hardware memory tagging. Clang and GCC do need extra flags to enable FORTIFY mode though. However on Android FORTIFY is now a requirement and future versions will make use of memory tagging on ARM hardware. So ironically something like Android does have a better sandboxing model as WebAssembly.
- saagarjha 7y ago> iOS compilers that make use of hardware memory tagging No iOS devices ship with ARMv8.5, so while I think compilers are implementing this today I am not sure if Xcode ships with this or if it's functional. > So ironically something like Android does have a better sandboxing model as WebAssembly. …you're not understanding what sandboxing means.
- pjmlp 7y agoApple has their own CPUs, https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication https://developer.apple.com/documentation/security/preparing... I do understand what sandboxing means, and how WebAssembly advocates keep overselling its security capabilities, by ignoring issues that other bytecode formats have taken a more serious approach, already in the mid-60's.
- saagarjha 7y agoPointer authentication≠memory tagging. The former requires ARMv8.3 and is in the A12 processor, and the latter is not in any hardware that Apple is currently shipping.
- pjmlp 7y agoYep, fighting windmills here.
- afiori 7y agoI believe that wasm is not particularly focused on functional security as much as embeddable security. Essentially the promise here is that you can download a random wasm from anywhere, run it with little-to-none privileges and be sure nothing bad can happen. There was an article here many months ago detailing how wasm on the server makes it harder to mitigate attacks due to lack of wasm-inspecting tooling compared to system utilities for processes/native binaries. But in part that is because the attack model of wasm is "literally executing malicious code".