Facebook/infer-infer types of bugs caught

Source: Internet
Author: User

Infer Bug Types
The person who wrote this document is also very careless, the overview says is OC/C bug type, but in the detailed explanation, but said only OC has, for example parameter not null checked overview

Bug types captured in Java Resource leak Null dereference

Bug types captured in C/oc Resource leak Memory leak Null dereference premature nil termination argument

Bug types captured only in OC Retain cycle Parameter NOT null checked Ivar NOT NULL checked Resource leak

Resource leakage problems exist in Java/c/oc, resources represent files, sockets, connections, etc., and need to be closed after use. Memory Leak

Memory leak issues only report Retain cycle in C/oc

Memory deadlock only exists in OC, a created b,b also created a, and then you wait for me, I wait for you, can not release Null dereference

JAVA/OC/C will report the problem of NULL references, when an object declaration is not initialized, it is referenced, and this time the null pointer error is reported. Parameter NOT NULL checked

Only reports in OC, parameters cannot be empty checks, such bugs and null reference errors are similar, but infer the problem alone. Ivar NOT NULL checked

Check for local variable not empty premature nil termination argument

This kind of error is reported in C/oc, some statements will be in the middle due to the appearance of nil resulting in a statement failure, such as:

Nsarray *foo = [Nsarray arraywithobjects: @ "AAA", str, @ "BBB", nil];

If STR is nil, creating a Nsarray string will fail.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.