Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

IBM-MAIN - Probleme bei Umstellung auf 64 bits durch 8-Byte-Pointer

Subject:

Re: Compile COBOL Programs In 64 Bit.

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>

Date:

2015.01.21 01:12:00


Am 20.01.2015 um 18:22 schrieb S.M.:
> In <54BE20BF.5030001@t-online.de>, on 01/20/2015
>     at 10:32 AM, Bernd Oppolzer <bernd.oppolzer@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

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie