sunflower-embedded-system-emulator
sunflower-embedded-system-emulator copied to clipboard
`dumppipe` segfaults for superH when SF_NUMA is 0
Describe the bug
dumppipe segfaults for superH when SF_NUMA is 0
To Reproduce Steps to reproduce the behavior:
- Set
SF_NUMAto 0 inconfig.h. - Re-compile sf.
- Run sf.
- Execute
dumppipecommand.
Expected behavior Initialized random number generator with seed 1012339143...
Sunflower 1.1 (build 08-19-2020-09:03:41-vt298@ip-172-31-19-5-Linux) Authored, 1999-2018: Phillip Stanley-Marbell [email protected]. 20018-onwards: See CONTRIBUTORS.TXT. This software is provided with ABSOLUTELY NO WARRANTY. Read LICENSE.txt
New node created with node ID 0
[ID=0 of 1][PC=0x8000000][3.3E+00V, 6.0E+01MHz] dumpregs R0 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R1 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R2 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R3 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R4 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R5 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R6 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R7 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R8 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R9 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R10 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R11 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R12 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R13 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R14 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] R15 0000 0000 0000 0000 0000 0000 0000 0000 [0x00000000] [ID=0 of 1][PC=0x8000000][3.3E+00V, 6.0E+01MHz] dumppipe
node ID=0, PC=0x8000000, ICLK=0, sleep?=0 Segmentation fault (core dumped)
Solution
Guard
mprint(E, S, nodeinfo, "buslock=%d, buslocker=%d, EX touches mem = %d\n", S->superH->B->pbuslock, S->superH->B->pbuslocker, superHEXtouchesmem(S));
in sim/pipeline-hitachi-sh.c with if (SF_NUMA).