OpenCores
Issue List
Or1ksim 0.3.0rc1 crashes if no config file #28
Closed jeremybennett opened this issue over 15 years ago
jeremybennett commented over 15 years ago

Reported by Frank Storm Frank.Storm@gmx.net:

I still found a small bug in the release candidate. If no config file is available, or1ksim crashes. The reason is in line 552 of file cpu/common/abstract.c

if (ic_state->enabled) temp = ic_simulate_fetch (phys_memaddr, memaddr); else temp = evalsim_mem32 (phys_memaddr, memaddr);

ic_state is NULL, so accessing field enabled results in a crash. There is probably a check needed somewhere earlier in the code. I have just compiled the code, so if I will find anything else, I will let you know.

jeremybennett commented over 15 years ago

Oops. The workaround is to substitute the two tests of ic_state->enabled in abstract.c with:<br> <br> if (NULL != ic_state) && ic_state->enabled)<br> <br> This will be fixed in the next release.

Jeremy

jeremybennett was assigned over 15 years ago
jeremybennett closed this over 15 years ago

Assignee
jeremybennett
Labels
Bug