Am 20.01.2015 um 18:22 schrieb Shmuel Metz (Seymour J.):
In <54be20bf.5030...@t-online.de>, on 01/20/2015
    at 10:32 AM, Bernd Oppolzer <bernd.oppol...@t-online.de> said:

if you are building linked lists etc, then pointers are part of
structures etc., and if you have this, if pointer size changes,
then offsets of other fields inside structures change, too.
Why is that a problem, assuming the same compiler and no hard-coded
offsets?

That exactly was the problem in our case,
address arithmetic using expressions like ptr - 4, ptr - 8, ptr - 12
in some cases, where certains sizes of length fields (ints) and ptrs
(4 bytes)
have been assumed ... which was ok for the length fields, because they stayed
at 4 bytes (int), but the ptrs went from 4 to 8 bytes.

The problem was: the code was broken, but this led not to errors immediately.
It was a free memory operation that simply got ignored by this wrong address
arithmetic, so the error showed up as a storage leak only much later ...
not easy to find ...

It was C, not PL/1 ... but from that experience I see absolutely no reason why
such things should not happen with PL/1, too, given a code base which is
large and complicated enough. I've seen such installations with 1000s of
PL/1 modules, where even the migration from OS/PL1 to EP/PL1 led
to significant problems, due to some subtle differences in compiler semantics ...
and there was no such format change ...

Kind regards

Bernd

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to