I have discovered that the following printf, when used in the SunOS 4.1 kernel, causes a crash (data fault): printf("%04x", (short int) kernel_variable); but this printf is okay: printf("%x", (short int) kernel_variable);