1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-25 03:45:44 +00:00

8 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
Jim Bevier
25b79339fd SEL32: Do general code cleanup to remove unused code.
SEL32: Update Ping and ICMP support code to use correct packet size.
SEL32: Update SetupNet script to support latest Fedora release.
SEL32: Improve disk write speed.
SEL32: Add .tap file reassignent support in sel32_mt.c.
2023-10-09 20:34:56 -04:00
B. Scott Michel
8b14bb69be
CMake build infrastructure II (#53)
* CMake build infrastructure

The squashed commit that builds and packages releases for the SIMH
simulator suite with CMake, version 3.14 or newer.

See README-CMake.md for documentation.
2023-05-17 20:18:42 -04:00
Jim Bevier
4e159a04ed SEL32: Add IPU device support using pthreads on Linux and Windows.
SEL32: Update makefile and SEL32.vsproj file to add IPU device.
SEL32: Update README.md file.
SEL32: Do a general code cleanup.
2023-02-07 20:30:54 -05:00
Paul Koning
9dea1cecd1 PDP9 VAX SEL32: Adjust test limits
Adjust the instruction limits for three simulators so they pass
on Apple M1 systems.
2022-11-28 11:01:33 -05:00
Mark Pizzolato
6c398df0ae simulator tests: Fix test setup to tolerate very busy or slow host systems
Adjust the RUNLIMIT to specify instructions instead of wall clock time.

On an unfettered system, the sel32 test completes after some 588 million
instructions.  On a slow host system, the system clock tick processing will
add to the total instructions executed.  Increase the limit to 750 million
instructions.
2022-11-13 11:07:46 -05:00
AZBevier
894871f64d SEL32: Correct Coverity detected warning errors. 2022-03-10 11:15:00 -07:00
AZBevier
4991701ee6 SEL32: Add new SEL32 simulator. 2022-03-03 16:25:48 -07:00