On 2019/6/16 6:23 下午, Dmitry Vyukov wrote: > Hi, > > This is regarding the subj patch: > https://bugzilla.kernel.org/show_bug.cgi?id=203573 > https://www.spinics.net/lists/linux-bcache/msg07474.html > (don't see a way to reply to the patch) > > This looks like a serious bug that would have been caught by > use-after-scope mode in KASAN given any coverage of the involved code > (i.e. any tests that executes the function once) if I am reading this > correctly. > But use-after-scope detection was removed in: > 7771bdbbfd3d kasan: remove use after scope bugs detection. > because it does not catch enough bugs. > Hard to say if this bug is enough rationale to bring use-after-scope > back, but it is a data point. FWIW this bug would have been detected > during patch testing with no debugging required. > Hi Dmitry, I although thought it should be reported by compiler, but no idea why compiler didn't complain. Anyway, since now I start to enable KASAN in my testing. Thanks. -- Coly Li