Semaphore code builds but test03 seg faults