[Info-vax] Macro32 Bugs, Porting (was: Re: How far away is first boot ?)
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Wed May 8 12:00:32 EDT 2019
On 2019-05-08 14:23:48 +0000, John Reagan said:
> Yet one more example of how Macro-32 (or any assembly code) comes with
> additional risks and requires a higher-level of skill.
Porting routinely exposes latent assumptions and latent bugs.
There was a latent bug found in some Macro32 code when porting it from
Alpha to Itanium, where a nonsensically-large bit-shift request was
(quickly) truncated by Alpha to (quickly) produce a (correct) zero
result, and where Itanium happily shifted bits for a whole lot longer
to get to that same zero result... The Alpha worked fine. The Itanium
code worked, but was much slower.
There was a latent bug in a third-party graphics device driver, where
the driver worked fine on V3 and routinely crashed on connect on V4.
The code hadn't zeroed out a register before setting some bits, and
then loading the register into the device CSR. VAX/VMS V3 SYSGEN
happened to zero that register prior to invoking the driver
initialization. V4.0 and later didn't clear that register, and quite
often had the low bit set in the register. The low bit was the "go"
bit in the device CSR. Sometimes the resulting initialization-time DMA
went from random memory out into the device buffers and nothing notable
happened as nobody was looking at the frame buffer right then, and
sometimes the DMA went the other way and from the device frame buffer
into random VAX memory and hijinks ensued. About a decade later, met
somebody at a DECUS event that was having that same trouble with that
same third-party graphics driver, and told them of the solution. They
were... surprised. They probably paid for their DECUS ticket in that
three-minute conversation, too.
Yes, Macro32 never got a lint tool or other similar development- and
testing-related tooling, and IDE support is poor. The whole of the
development tooling on OpenVMS is an increasing problem. VSI is
working on parts of this, and there's far more work awaiting.
We'll be going through this process again soon enough with the x86-64
port becomes available, and the associated efforts to port our apps and
to verify the dependencies.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list