Category: Programming

  • Cross-compilation

    GCC fully supports cross-compilation: building a program on one machine in order to run it another. However, it’s quite painful to actually build a full cross-toolchain with compiler, tools, and libraries. Many people new to the process have the same reaction: it simply can’t be this hard. But it is. The basic problem is that…

  • Copying

    It’s interesting that the U.S. economy has moved away from manufacturing at the same time as computers have made it very easy to copy digital goods. We see the U.S. pushing China hard to enforce their copyright laws, because much of what the U.S. has to sell is easily copied. The U.S. has developed great…

  • Race Conditions

    The Go language is generally safe, in that errors in your program do not lead to unpredictable crashes (unless you use the facilities in the unsafe package). There is one classic cause of problems, however, which Go does not protect you from: race conditions. A race condition occurs when one goroutine modifies a variable and…

  • Inboxes

    When I started using networked computers, I had two inboxes: e-mail and Usenet. I read every e-mail message I received. I read most Usenet postings in the groups I followed, but it was no big deal if I missed some. Those are the two main types of inboxes: the ones where you pay attention to…

  • .gcc_except_table

    Throwing an exception in C++ requires more than unwinding the stack. As the program unwinds, local variable destructors must be executed. Catch clauses must be examined to see if they should catch the exception. Exception specifications must be checked to see if the exception should be redirected to the unexpected handler. Similar issues arise in…