balazske added inline comments.

================
Comment at: 
clang/test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist:270
    <key>description</key><string>Dereference of null pointer (loaded from 
variable &apos;x&apos;)</string>
-   <key>category</key><string>Logic error</string>
+   <key>category</key><string>Memory error</string>
    <key>type</key><string>Dereference of null pointer</string>
----------------
vsavchenko wrote:
> I might've missed some discussions on that matter, so please correct me on 
> that.
> In my opinion, null pointer dereference is not a memory error.  Null address 
> is not a correct memory and never was, so it is a logic error that a special 
> value is being interpreted as the pointer to something.
I can not decide which is better, "logic error" can be said for almost every 
possible bug. Here the problem is at least related to memory handling. The 
reference of undefined pointer value is "logic error" too (it is known that the 
value was not initialized) but a memory error (try to access invalid or valid 
but wrong address). Probably "pointer handling error" is better?
(One value for bug category is not a good approach, it is never possible to 
classify a bug to exactly one.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84494/new/

https://reviews.llvm.org/D84494

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to