Re:Git: Malicious repositories can execute remote code while...
by Agentlien on Tuesday March 09, 2021 @11:26PM
(#26407760)
I am really fascinated by the responses to this comment. So many people exclaiming how many issues are caused by caches. In ten years as a fulltime programmer the only cache issues I've seen are cache misses. It probably has to do with one's field. I'm a game developer mainly dealing with graphics programming.
[ Parent
| on HN ]
Re:Git: Malicious repositories can execute remote code while...
by ironmagma on Wednesday March 10, 2021 @12:10AM
(#26408017)
The key problem (as I understand it) is that updating a cache properly requires knowing the exact graph of relations that an entry in the cache has to other entries. So that when that entry changes, you can propagate that change throughout the cache to other concerned entries which need to be recomputed. But knowing that exact graph is too complex a task to be trivial, it seems in this case. Basically it sounds like the non-visual version of rerendering UI when a state changes, which is hard enough even with visual feedback.
Re:Git: Malicious repositories can execute remote code while...
by josefx on Wednesday March 10, 2021 @01:24AM
(#26408395)
A lot of threading issues are also cache related. Forget to properly mark access to shared variables and suddenly every thread /CPU core ends up with its own locally cached version of it.
Re:Git: Malicious repositories can execute remote code while...
by Agentlien on Wednesday March 10, 2021 @01:46AM
(#26408549)
Yes, but this is such a well understood danger that I've never really been bitten by it in practice.
Along the same lines a lot of GPU programming tutorials warn of inconsistencies between threads and it has never been a problem since I just assume I cannot rely on consistency or order of execution, seeing each thread as separate and independent.