PL/I doesn't prevent memory access bugs, but it makes it easier to do good programming. For example, parameters are passed by descriptor, so the allocated size is passed allowing run-time bounds checking. On the other hand, there is an equivalent of C type-casting, so it is still possible for the programmer to shoot themselves in foot while simultaneously hoisting themselves on their on petard.