× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> in an SQL ILE/C pgm.  I do not get the message when I run the
> pgm in debug!

This 'in production mode but not in debug' generally hints at one of two things;

(i) An variable that is not initialised. It could be one used in the call, or 
one that is on the stack 'next to' one of the variables used in the call and 
the function is reading the garbage in this uninitialised variable.

(ii) A null terminated variable, that's not null terminated. This often happens 
if you allocate memory for a variable but don't allocated enough for the null 
terminator. The function you call my be using the null terminator as a 
'stopper' and as it's missing is running over the end of the variable and using 
data from the 'next' variable in memory.

Although it's more work and seems redundant given that other languages do it 
for you, in C/C++ you should try to get into the habit of explicitly 
initialising variables (where you can) when you declare them - it will help 
reduce these kind of issues where it will take hours/days to track down. Also 
some of these issues like this seem worse on various releases than others and 
so while without explicitly initialising them it 'works' on your system when 
you move the code to another system it could start failing.

--phil


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.