His talks always fascinate me somehow lol Great job as always! I love this guy's talks!
@andrewpod56936 жыл бұрын
Actually it's good, really good. Without any unnecessary "stage performance".
@georganatoly6646 Жыл бұрын
surprisingly well put together and delivered
@mrlithium696 жыл бұрын
Thanks for your talk. It was exceptional. =D
@OCTAGRAM5 жыл бұрын
Changing architecture was not strictly required. GNAT and GCC (that GNAT being the most important part of), implements zero cost exceptions internally (using DWARF format or something) and registers its handler once for all the code ZCX covers. Nonetheless I am thankful to Microsoft that these changes are forced for all x64 code. Linux lacks strong hand to make everybody follow the rules. Ada, Delphi, FPC, Java all are competing to change global per-process SIGSEGV handler, but then fail to handle hardware exceptions in the scope of foreign programming language. Nobody can end this havoc in Linux, and in Windows everything just works, for 24+ years. Experiments with resumable exceptions happened in Mesa decades ago. They reported subtle issues with non-unwound code still holding a mutex while handler trying to do something that requires this mutex to be available. So they developed some stuff to release mutexes before entering handler, forbidding handler to use stuff protected by mutex, and reacquiring mutexes again if handler decided to resume. So many subtle issues lead to wide abandonment of resumable exceptions in most programming languages.
@tk36_real2 жыл бұрын
12:32 wouldn't like all compilers optimize and print out 0 twice?
@patrolin Жыл бұрын
if the compiler can prove that ConstantZero doesn't change, then yes but he writes to it, so...
@zeez77772 жыл бұрын
Great talk
@luncliff6 жыл бұрын
Thanks for your talk. I really like it. :D
@peterfireflylund5 жыл бұрын
I wonder if the exception handling and stack unwinding happens on a separate stack. That would explain why CaptureStackBackTrace() from an SEH exception handler on WIN32 captures a short trace leading up to the exception handler but not the trace from the start of the program leading up to the actual exception being raised.
@FiveFiveZeroTwo2 жыл бұрын
At 12:32, how did ConstantZero get set to 1? If the write is retried it'll just fail again wouldn't it?
@bumbread59892 жыл бұрын
In the handler he makes the memory page he's writing to writeable, that way he can now alter the value of that variable
@fromscratch36333 жыл бұрын
there isn't something like that in CPU, so const is a compiler thing it does not reflect to binary
@bumbread59892 жыл бұрын
There is a way to make certain memory regions unwriteable or unreadable in the CPU. That's the whole reason OS even knows that you have attempted to access those addresses.
@maxbd2618 Жыл бұрын
Yeah but I'm assuming the actual value is in a read-execute page of memory, so when you try to write the OS throws a write violation
@messerschnitt79436 жыл бұрын
I don't know... I find the talk somehow boring (didn't even finish watching it), feels like he is simply just reading out loud some manual found somewhere on the msdn ... in most parts doesn't even explain WHY it is done in this particular way, etc.
@mrlithium696 жыл бұрын
Yea Exceptions are pretty boring. But you should be glad he is condensing years worth of knowledge down to an hour of your time. The things he skipped are obscure and need hours of background explanation, and are not the most important. As far as "Why?", its mostly "because thats how it is" - status quo - he didnt design the ABI or Windows SEH - Don't shoot the messenger. Theres also a movement happening to re-think exceptions entirely from the ground up due to performance implications and lots of people just disabling them entirely. So taking time to understand the legwork of all the error handlers and stack unwinding and windows OS functions is an insight into exactly why its so slow, (besides context switches and such); it's being an informed programmer citizen. Maybe you want another talk comparing and constrasting different Exception concepts. He went into it a bit at the end. Also he is not saying this is the ideal mental or computational model for exceptions, he just is explaining what life is like currently.
@TheChrisey6 жыл бұрын
"As any programmer would".. Please speak for yourself.. Anyone who has the slightest idea about how segments work knows not to write to anyrhing in .rodata for obvious reasons
@ericLemanissier6 жыл бұрын
You realize it was a joke, right?
@TheChrisey6 жыл бұрын
Yes I do, thank you very much. It was a very bad one though.