A Tourist’s Guide to the LLVM Source Code
Hi, would you allow me to translate your article to French, preferably under a free lincense like CC-by-sa?
[This piece is co-authored with Vsevolod Livinskii.] Formal verification isn’t some sort of magic pixie dust that we sprinkle over a computer system to make it better. Real formal verification involves a lot of the same kind of difficult, nasty, grungy engineering work that any other systems-level job involves…
Visit blog.regehr.org → RSS feedOn Hacker News May 2010 – Aug 2023
Software Engineering 34Programming Languages 20Systems & Performance 8Life, Learning & Writing 6Security & Privacy 5Career & Management 3
Hi, would you allow me to translate your article to French, preferably under a free lincense like CC-by-sa?
I was hoping you would mention the dynamic checkers, ASAN etc. My fear is people will start using these but not understand how to really use them properly. Since they’re dynamic checkers you really need a good testing harness and test cases to go with it. The bugs ASAN/TSAN etc catch are usually strange boundary…
[…] Embedded in Academia : Why Take a Compiler Course? – Seconded, or whatever – my compiler course was briefer than I'd have liked but many of my peers didn't take it and I spent ages explaining what I thought where simple concepts to them when working on group projects and the like. […]
A some simpler unix stuff can be run here without needing anything but a browser: http://bellard.org/jslinux/
Does the standard say whether or not “char” is “unsigned char” or “signed char”? (I guess not from what you wrote above.)
This is very nice summary of IR Passes. I found “InstCombine” pass to be easier to start with to understand the code flow in LLVM IR Pass. Maybe the beginners can start with that first.
I’ve done plenty of these, when I wanted to switch half my brain off but still do something time-consuming and fiddly, but still kind of productive. Very therapeutic!
What implications exist around linking friendly-c code with machiavellian-c? I.e. put the performance critical kernels in there own module and work realy hard to make it correct.
Another reason for optimizing compilers: It allows us to write simple and obvious code expecting that the compiler will do the optimization. This both reduces the initial defect count and makes the code more maintainable in the long-run. Note that these are also often the simplest optimizations (e.g. a calculation…
I don’t know if it helps, but Illinois CS distinguishes the two kinds of programs with two different degrees: MS in CS for the research program, and MCS for the coursework program. Most of the MS students receive funding andtuition waivers, while I’m not sure if the MCS students are even eligible for support.
Minor nit: printing the predecessors of a basic block is a feature of the IL printer, not Clang. It is just visualizing information that is implicit in the IR anyway.
The Standard does not require that implementations define intptr_t nor uintptr_t. It also does not require that implementations define integer-to-pointer conversions in any meaningful fashion unless they define those types. Conforming implementations are certainly allowed to document some integer-to-pointer…
I had a student (Fred Smith) who worked on extensions to Popcorn (the predecessor to Cyclone) that supported run-time code generation in a lightweight fashion. Here’s a paper describing part of the system: https://ecommons.cornell.edu/handle/1813/5812 . Fred’s thesis had a bunch more.
One thing that works well in practice in cases where you really don’t want to process single bytes at a time is to use a union for going from one type to another. Granted, writing one member of a union and reading from a different one also isn’t allowed per the standard, but every compiler I’ve come across allows it…
Alas, our minds automatically fill in gaps and cover over mistakes when we read.
This is great work. Though I must confess I’m more interested (and far more uneasy) about the other side of the coin — people developing projects like these involving machine learning to find and exploit the vulnerabilities in a fully automated fashion. This is related to, but not quite the same as, attempts at…
Since you talk about the sanitizers and tools like Checked-C, I’ll note there’s also SaferCPlusPlus[1], which is essentially a memory-safe (and data race safe) subset of C++. The idea is that there are a finite number of C++ elements that contribute to memory unsafety, and since the advent of C++11, it is now…
What has caused you to slack off on the bug reporting? The cost of computer time or the human effort side? (I’m guessing the second.)
“An obvious way to deal with embedded interpreters — which someone must have thought of and tried, but I don’t have any pointers — would be to have an API for teaching the fuzzer how to see coverage of the language being interpreted.”
The issue with things like Frama-C is that they are by far the easiest to use if you start out a project using them, and you often don’t know which projects you retroactively wished you had done so until they are big and crufty.
It’s terribly punny/dorky of me, but reading your post it just occurred to me one could start a blog called “Race Condition” about being a person of color and being a computer scientist.
Regarding the example #5, I must be confused about the definition of a sequence point because the resulting assembly output seems to be non-ANSI C:
How many problem domains require wrapping signed integers or non-wrapping unsigned integers? Can the current undefined case be replaced with a trap and everything else be left intact?
Byte swapping does not necessarily imply the data comes from an external source. For example, when writing graphics code, you sometimes need to do byte swapping if you’re converting between 24-bit RGB and BGR image formats (Windows’ GDI famously uses BGR so this is one place where you need to do such conversions)…