Author: regehr

  • A Bit Puzzle

    I love a good bit-level puzzle. Today’s is one I learned about from a comment in a Google+ discussion: Given two words a and b, return the high bits that they have in common, with the highest bit where they differ set, and all remaining bits clear. So 10101 and 10011 yields 10100. Then do…

  • A Different Approach to System Security

    I enjoy it when science fiction has something useful to say about computer security. Towards the end of Iain M. Banks’ Matter, there’s a big space battle and we find this passage: “Compromised,” Hippinse told him. “Taken over by the other side. Persuaded by a sort of thought-infection.” “Does that happen a lot, sir?” “It…

  • Android Projects Retrospective

    The Android Projects class I ran this semester has finished up, with students demoing their projects last week. It was a lot of fun because: I find mobile stuff to be interesting the students were excited about mobile the students were good (and taught me a ton of stuff I didn’t know) the course had…

  • Pluggable Domain-Specific Testcase Reducers

    An important part of effective random testing is providing developers with actionable testcases, and a big part of creating actionable testcases is testcase reduction. Delta debugging, as exemplified by the delta tool, is a good generic reduction technique. However, in many cases, as I discussed the other day here, a domain-specific reducer can do a…

  • How Integers Should Work (In Systems Programming Languages)

    My last post outlined some of the possibilities for integer semantics in programming languages, and asked which option was correct. This post contains my answers. Just to be clear: I want practical solutions, but I’m not very interested by historical issues or backwards compatibility with any existing language, and particularly not with C and C++.…

  • How Should Integers Work?

    Integer computer math is kind of a bummer because it’s a lot more complicated than it seems like it should be. I’m specifically talking about the way that fixed-width integers wreck havoc on program logic when they overflow. There are other issues, but this seems like the big one. So: How should integers work? C/C++’s…

  • The Art and Science of Testcase Reduction for Compiler Bugs

    Test case reduction is a common problem faced by programmers where some large input (or more generally, some complicated set of circumstances) causes a program to fail, but we wish to know the smallest input (or the simplest circumstances) that causes the same failure. Reduced test cases are important because: Since the bulk of the…

  • Csmith 2.1 Released

    We’ve released version 2.1 of Csmith, our random C program generator that is useful for finding bugs in compilers and other tools that process C code. The total number of compiler bugs found and reported due to Csmith is now more than 400. All Csmith users should strongly consider upgrading. New features in this release…

  • Perverse Incentives in Academia

    A perverse incentive is one that has unintended consequences. The world is full of these and the Wikipedia article has some great examples. Academia seems particularly prone to perverse incentives. Incentive Intended Effect Actual Effect Researchers rewarded for increased number of publications. Improve research productivity. Avalanche of crappy, incremental papers. Researchers rewarded for increased number…

  • Towards Tinkers

    The heroes of Vernor Vinge’s The Peace War are members of a scattered society of tinkers who — without any real industrial base — manage to develop and produce very high-tech devices including fast, small computers. I’m trying to figure out how realistic this is. The software side seems entirely feasible. Today’s open source community has…