On 3/06/2011 9:20 PM, Bernd Oppolzer wrote:
Hello David,

yes, we are using EDCXSTRL. But anyway:

iconv is part of the RTL runtime package, this is a large module
called CEESG003. Part of this module is the RTL malloc routine, too.
The references between the two are already resolved, so the RTL iconv
will always call the RTL malloc.




In the MQS exit, we have calls to iconv and malloc, among others. These two
external references are resolved in the following ways: the iconv that we
call is resolved by a stub which calls the iconv part of the RTL runtime
package dynamically which in turn calls the RTL malloc. The malloc that
we call is resolved by the SPC malloc.


But that's what I don't understand Bernd. How can there be multple malloc's in the same load module. Even if one is just a stub. If you link in the following order then the SPC version of malloc should be the only malloc!

//SYSLIB   DD  DSN=SYS1.CEE.SCEESPC,DISP=SHR
//                DD  DSN=SYS1.CEE.SCEELKED,DISP=SHR

So we have a mixture of two different mallocs. The mallocs that we do outside
iconv are resolved by SPC malloc, and the malloc inside iconv stays with the
RTL malloc (because the RTL runtime package is not relinked again; the linkage
between RTL iconv and RTL malloc is fixed in the CEESG003 load module and
does not change).

Kind regards

Bernd


Am Donnerstag, 2. Juni 2011 10:21 schrieben Sie:
Bernd,

I don't understand how iconv() could be calling the RTL malloc() when
the binder should have only included the SPC malloc from SCEESPC.
I assume that you are using EDCXSTRL and not EDCXSTRT?


On 2/06/2011 3:22 PM, Bernd Oppolzer wrote:
Hello,

we have the following problem:

we recently got the responsibility for the site-specific MQS exits.
These MQS exits
are written using SPC (System Programming C). This is recommended by MQS,
or maybe it is a restriction of the MQS environment.

We link the exit with the SCEESPC lib and the SCEELKED lib, because we
are
using ANSI C library functions, which is possible, following the SPC
documentation.

So we get the functions like malloc etc from the SPC lib and the
functions like fopen etc.
from the SCEELKED lib.This seems to be OK and it works.

But now there is one exit (the security exit), where we have a call to
iconv too.
iconv is part of the SCEELKED library and not an ANSI function.

iconv seems to call malloc, and this is the "normal" malloc, not the
SPC one
(because iconv and malloc, when linked from the SCEELKED lib, are only
stubs
with 10 bytes length, but they call in fact the real functions in
CEESG003,
which is a large module containing all the LE runtime).

So we have a mixture of "normal" malloc and SPC malloc.

Now: this seemed to work for previous versions of MQS, maybe because
MQS had built an LE environment, before calling the exits. But now,
the security
exit abends with S0C4, when iconv is called and calls the "normal"
malloc.

Do you have any suggestions? The only idea we have at the moment is:
to get rid of the iconv call and to do the code conversion with own code.

Kind regards

Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to