Re: 4GL application core dumps
Posted in 1999
I spoke too soon on this one. We did find a
problem in the PREPARE statements.
When preparing at statement from a
character string, the value of the string gets
expanded, ie. a blank space is placed
around each parenthesis and comma,
thus expanding the length of the
character string, thus writing to memory
outside the boundary of the string,
thus causing a sgementation fault and core
dump.
Sample program showing the error:
main
define str char(2000),
i smallint
LET str = "CREATE TABLE aaaa1920",
" (tmpline SMALLINT,",
"fcode SMALLINT,",
"action CHAR(1),",
"invnum CHAR(16),",
"upflag CHAR(1))"
#
#-----display value of str and its length
#
display str clipped
let i = length(str)
display "length = ",i
#
#-----prepare string str
#
prepare test_stmt from str
#
#-----display value of str again and its length
# Note: value of str is changed!! and it's length
#
display str clipped
let i = length(str)
display "length = ",i
end main
Output from program on Solaris 5.7, I4GL 7.30.UC1,
and IDS 9.20.UC1:
CREATE TABLE aaaa1920 (tmpline SMALLINT,fcode SMALLINT,action CHAR(1),invnum
CHAR(16),upflag CHAR(1))length = 101
CREATE TABLE aaaa1920 ( tmpline SMALLINT , fcode SMALLINT , action CHAR
( 1 ) , invnum CHAR ( 16 ) , upflag CHAR ( 1 ) )length = 123
We're passing the info along to tech support to get fixed.
Candy
--
Candy McCall
ONLINE Computing, Inc.
(candym@olcinc.com)
>Well, it looks as if it's just the order of
>installation of tools and engines. Our
>customer re-installed and thus far
>no core dumps.
>
>Candy--
>Candy McCall
>ONLINE Computing, Inc.
>(candym@olcinc.com)
>
>
>
>>We have a customer who upgraded their 4GL and
>>engine:
>>
>>They were previously at:
>>
>>Solaris 5.6
>>IDS 7.23.UC2
>>I4GL 6.04.UC1
>>
>>They upgraded to:
>>
>>Solaris 5.7
>>IDS 9.20.UC1 (Foundation 2000)
>>I4GL 7.30.UC1
>>
>>Now they are encountering core dumps
>>in the 4GL application when previously
>>they were not encountered.
>>
>>As anyone encountered any problems with
>>this combination? We haven't as yet analyzed
>>exactly where in the code the core dumps
>>happens, but wondered if anyone else has
>>encountered this problem.
>>
>>Thanks in advance for any help!
>>
>>Candy
>>--
>>Candy McCall
>>ONLINE Computing, Inc.
>>(candym@olcinc.com)
>>
>