about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-12 14:00:28 +0000
committerbors <bors@rust-lang.org>2023-03-12 14:00:28 +0000
commitf41927f30943e4d57af62cfcedc9f07b819013e7 (patch)
treeac1896f170229aa3f52c6a8e402d890208071e51 /compiler/rustc_interface/src
parent24c0b81c1fd5de8e00276524896d3352ed91a8cb (diff)
parente955ec0908c54b33ab08d4b768c9f8aa8071c643 (diff)
downloadrust-f41927f30943e4d57af62cfcedc9f07b819013e7.tar.gz
rust-f41927f30943e4d57af62cfcedc9f07b819013e7.zip
Auto merge of #108820 - cjgillot:ensure-on-disk, r=oli-obk
Ensure value is on the on-disk cache before returning from `ensure()`.

The current logic for `ensure()` a query just checks that the node is green in the dependency graph.
However, a lot of places use `ensure()` to prevent the query from being called later. This is the case before stealing a query result.

If the query is actually green but the value is not available in the on-disk cache, `ensure` would return, but a subsequent call to the full query would run the code, and attempt to read from a stolen value.

This PR conforms the query system to the usage by checking whether the queried value is loadable from disk before returning.

Sadly, I can't manage to craft a proper test...

Should fix all instances of "attempted to read from stolen value".
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions