Issue in pro*C program compiled in solaris 10

Hi,
We upgraded our servers from solaris 9 to 10. We recompiled all the Pro*C programs with the new oracle version as well. Oracle is 11g. We are facing core dump with the below error for certain executions. But when we are placing new statements between the error fucntion we get junk values to the output files.

Replace_Char(l_exp_descr, SPACE, (char)NULL, TRAILING); 

/*int len_type=strlen(l_expense_type);
int len_descr=strlen(l_exp_descr); */

EXEC SQL
SELECT subaccount
INTO :local_subaccount
FROM btadmin.gce_exp_sub_cd
WHERE exp_type = trim(:l_expense_type) AND
exp_descr = trim(:l_exp_descr) AND
site = :what_site;

There are so many possible sources for the problem.

What version of cc or ggc are you using? What version did you have before?
Were the old compiled files 32 bit? Are the new files 32 bit as well?
Did you change your makefiles or the configuration for proc (Pro*C precompiler)?
What EXACT error are you getting?
Have you examined core dumps and located the problem?

Please provide a sample function that you know bombs, along with the EXACT error you got.