I think the run time errors are due to improper use of pointers. I believe I’m assigning values to seg and part pointers without allocation memory appropriately first. Obviously malloc() can’t be used on the kernel.
So I’ll review my entire code keeping this in mind and see what I can do. If this fails too, I’ll use the debugging tools suggested to me on the BRL-CAD mailing list.