accel-sim / accel-sim-framework

This is the top-level repository for the Accel-Sim framework.
https://accel-sim.github.io
Other
290 stars 110 forks source link

Cache reservation fail but idx is not set. Resulting in SEGF #186

Closed JRPan closed 1 year ago

JRPan commented 1 year ago

https://github.com/accel-sim/gpgpu-sim_distribution/blob/948c0e1a0e379e37e60c83b9ab622217522aea86/src/gpgpu-sim/gpu-cache.cc#L411 Linked above, tag_array::fill calls tag_array::probe, which is below https://github.com/accel-sim/gpgpu-sim_distribution/blob/dev/src/gpgpu-sim/gpu-cache.cc#L249

The tag_array::probe returns RESERVATION_FAIL without setting the idx. Which results in SEGF

rodhuega commented 1 year ago

Can this be related with this other issue #139 ?

JRPan commented 1 year ago

I thought about this actually. The idx is not set in case of RESERVATION_FAIL. So this bug is not related. But maybe it should not return reservation fail at all, just as #139 suggested.

rodhuega commented 1 year ago

I think is related, because if the ratio is higher than the dirty_line_percentage, it never reaches all_reserved = false; So then, it will enter in the final if that says if(all_reserved) saying RESERVATION FAIL, and also idx won't be set.