1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-13 15:27:46 +00:00

9 Commits

Author SHA1 Message Date
B. Scott Michel
c20b391eea ETH_MAC indirection erratum
Pervasive misuse of "ETH_MAC *" (a pointer to an ETH_MAC, aka a 6
element unsigned char array) when a simple "ETH_MAC" is correct.  The
best example of this was eth_mac_fmt() in sim_ether.c with the following
prototype:

    t_stat eth_mac_fmt (ETH_MAC* const mac, char* strmac)

The first parameter is a pointer to an array of 6 unsigned characters,
whereas it really just wants to be a pointer to the first element of the
array:

    t_stat eth_mac_scan (const ETH_MAC mac, char* strmac)

The "ETH_MAC *" indirection error also results in subtle memcpy() and
memcmp() issues, e.g.:

    void network_func(DEVICE *dev, ETH_MAC *mac)
    {
      ETH_MAC other_mac;

      /* ...code... */

      /* memcpy() bug: */
      memcpy(other_mac, mac, sizeof(ETH_MAC));

      /* or worse: */
      memcpy(mac, other_mac, sizeof(ETH_MAC));
    }

eth_copy_mac() and eth_mac_cmp() replace calls to memcpy() and memcmp()
that copy or compare Ethernet MAC addresses. These are type-enforcing
functions, i.e., the parameters are ETH_MAC-s, to avoid the subtle
memcpy() and memcmp() bugs.

This fix solves at least one Heisenbug in _eth_close() while free()-ing
write request buffers (and possibly other Heisenbugs.)
2025-08-17 16:02:56 -04:00
Richard Cornwell
9b2f13d443 KA10: Fixed some coverity errors. 2022-03-10 19:12:46 -05:00
Richard Cornwell
91aee9b39f KA10: Release 3 of PDP10 simulators. KS10 support added.
Added KS10 support.
    CPU Redid instruction decode to improve performance
    Triple-I display cleanup.
    Normalized end of line to DOS/Unix.
    KL10 FE, Cleanup issues with TTY devices hanging simulator..
    Fixed errors in RH20 device.
    RP and TU drives more independent of RH controller.
2022-02-19 20:25:44 -05:00
Richard Cornwell
435eb0e599 KA10: Cleanup typos in debug help. 2020-11-19 21:20:09 -05:00
Richard Cornwell
f4d1abd61d KA10: Removed compiler warnings. 2020-10-13 20:06:04 -04:00
Richard Cornwell
3f55005d21 KA10: Regular update to sync to development source.
Removed DEV_NET and fixed DEV_type on various devices.
   Support for 64 lines on KL10 FE by default.
   Fixed support for 32 lines on DC10.
   Support for TYPE 340 Display undocumented functions.
2020-04-17 18:19:54 -07:00
Richard Cornwell
c22766b760 KA10: Corrected error in NIA Padding. Handle disabled RH devices. 2020-03-25 20:24:13 -07:00
Richard Cornwell
7acb4554bb KA10: Removed PACK definition, add polling if async eth fails. 2020-03-12 00:10:15 -04:00
Author: Richard Cornwell
c686f75894 KA10: Added support for KL10A/B. 2020-03-09 23:07:47 -07:00