Patron Update – segmentation fault using kdevelop

I’m having a problem with segmentation faults using the kdevelop integrated development environment while altering uvm_patroncmp.c  This is the program that compares patron records in an “old” file to a “newer” file and decides whether a record should be added, changed or expired.  Changed and added records are written to a transaction file and expired records are written to an expiration file.

I need to modify this file so that the new and old records are compared on the institution id field instead of the ssan field.  I tried just substituting all of the applicable occurences of ssan with institution_id which seems like it should work because the size of the field is specified with the sizeof key word in the comparison clause like the following:

if (memcmp(new_sif.ssan, old_sif.ssan, sizeof old_sif.ssan) > 0)

When I did this and compiled it, the result was a segmentation fault. Now I’ve reverted to the original file and I’m still getting a segmentation fault!

OK.  More information.  The scripts and programs for updating patron records is on a 64 bit linux machine.  I have been using my 32 bit test machine to modify the c program and that is where I’ve had the segmentation faults.  I recently made the ssan to institution_id substitution on the host 64 bit server without any problems.  I don’t think there is anything in the source code that is forcing it to be compiled as 64 bit.  I still don’t know what is going on.

 

Author: korkiley

Systems Administrator at University of Vermont (retired as of 7/1/2012) Married Favorite Activities: Condor Glider Online Competition, Developing web sites, making espresso, and keeping a blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s