----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3780/#review9261 -----------------------------------------------------------
src/arch/riscv/process.cc (line 222) <http://reviews.gem5.org/r/3780/#comment7924> Two comments: 1. Shouldn't this at least have a warning? If the syscall arg register > 3 there is definitely a bug, right? 2. Can you return "0" instead of the last register? I think that's a better failover case. - Jason Lowe-Power On Jan. 12, 2017, 9 p.m., Alec Roelke wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3780/ > ----------------------------------------------------------- > > (Updated Jan. 12, 2017, 9 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11795:44b4eec15cd7 > --------------------------- > riscv: Fix crash when syscall argument reg index is too high > > By default, doSyscall gets the values of six registers to be used for > system call arguments. RISC-V, by convention, only has four. Because > RISC-V's implementation of these indices is as arrays of integers rather > than as base indices plus offsets, trying to get the fifth argument > register's value will cause a crash. This patch fixes that by providing > the fourth register's value for any index higher than 3. > > > Diffs > ----- > > src/arch/riscv/process.cc 97eebddaae84 > > Diff: http://reviews.gem5.org/r/3780/diff/ > > > Testing > ------- > > > Thanks, > > Alec Roelke > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
