Bug 1175203 (infer)

[meta][infer] Issues detected in Fennec by running Infer

RESOLVED FIXED

Status

()

task
RESOLVED FIXED
4 years ago
3 months ago

People

(Reporter: rnewman, Unassigned)

Tracking

(Blocks 1 bug, {meta})

Firefox Tracking Flags

(Not tracked)

Details

/m/a/b:

AndroidGamepadManager.java:175: error: NULL_DEREFERENCE
   object pending last assigned on line 171 could be null and is dereferenced at line 175

AndroidGamepadManager.java:259: error: NULL_DEREFERENCE
   object returned by org.mozilla.gecko.AndroidGamepadManager.sPendingGamepads.get(valueOf(deviceId)) could be null and is dereferenced at line 259

AndroidGamepadManager.java:328: error: NULL_DEREFERENCE
   object gamepad last assigned on line 327 could be null and is dereferenced at line 328

ContactService.java:318: error: NULL_DEREFERENCE
   object cursor last assigned on line 315 could be null and is dereferenced at line 318

ContactService.java:522: error: NULL_DEREFERENCE
   object cursor last assigned on line 521 could be null and is dereferenced at line 522

ContactService.java:1483: error: NULL_DEREFERENCE
   object cursor last assigned on line 1482 could be null and is dereferenced at line 1483

ContactService.java:1729: error: NULL_DEREFERENCE
   object cursor last assigned on line 1726 could be null and is dereferenced at line 1729

CrashReporter.java:83: error: RESOURCE_LEAK
   resource acquired by call to FileInputStream(...) at line 75 is not released after line 83

CrashReporter.java:83: error: RESOURCE_LEAK
   resource acquired by call to FileOutputStream(...) at line 76 is not released after line 83

CrashReporter.java:264: error: RESOURCE_LEAK
   resource acquired by call to FileReader(...) at line 263 is not released after line 264

CrashReporter.java:314: error: RESOURCE_LEAK
   resource acquired by call to FileInputStream(...) at line 311 is not released after line 314

CrashReporter.java:324: error: RESOURCE_LEAK
   resource acquired by call to exec(...) at line 320 is not released after line 324

FilePickerResultHandler.java:100: error: NULL_DEREFERENCE
   object cursor last assigned on line 98 could be null and is dereferenced at line 100

FilePickerResultHandler.java:237: error: RESOURCE_LEAK
   resource acquired by call to FileOutputStream(...) at line 221 is not released after line 237

GeckoAppShell.java:1685: error: RESOURCE_LEAK
   resource acquired by call to exec(...) at line 1684 is not released after line 1685

GeckoAppShell.java:1720: error: RESOURCE_LEAK
   resource acquired by call to exec(...) at line 1684 is not released after line 1720

GeckoAppShell.java:1755: error: RESOURCE_LEAK
   resource acquired by call to exec(...) at line 1754 is not released after line 1755

GeckoAppShell.java:1787: error: RESOURCE_LEAK
   resource acquired by call to exec(...) at line 1754 is not released after line 1787

GeckoAppShell.java:2501: error: NULL_DEREFERENCE
   object lock last assigned on line 2500 could be null and is dereferenced at line 2501

GeckoAppShell.java:2591: error: RESOURCE_LEAK
   resource acquired by call to FileOutputStream(...) at line 2575 is not released after line 2591

GeckoProfile.java:329: error: NULL_DEREFERENCE
   object profile last assigned on line 324 could be null and is dereferenced at line 329

GeckoProfile.java:715: error: NULL_DEREFERENCE
   object sections last assigned on line 714 could be null and is dereferenced at line 715

GeckoProfileDirectories.java:142: error: NULL_DEREFERENCE
   object returned by parser.getSections() could be null and is dereferenced at line 142

GeckoProfileDirectories.java:194: error: NULL_DEREFERENCE
   object returned by parser.getSections() could be null and is dereferenced at line 194

GeckoProfileDirectories.java:215: error: NULL_DEREFERENCE
   object returned by parser.getSections() could be null and is dereferenced at line 215

GeckoSmsManager.java:806: error: NULL_DEREFERENCE
   object cursor last assigned on line 803 could be null and is dereferenced at line 806

GeckoSmsManager.java:876: error: NULL_DEREFERENCE
   object cursor last assigned on line 874 could be null and is dereferenced at line 876
background:

background/fxa/FxAccountClient10.java:367: error: NULL_DEREFERENCE
   object returned by body.getLong("code") could be null and is dereferenced at line 367

background/fxa/FxAccountClient10.java:368: error: NULL_DEREFERENCE
   object returned by body.getLong("errno") could be null and is dereferenced at line 368

background/fxa/FxAccountClient10.java:728: error: NULL_DEREFERENCE
   object verified last assigned on line 727 could be null and is dereferenced at line 728

background/fxa/FxAccountClient20.java:85: error: NULL_DEREFERENCE
   object returned by body.getBoolean("verified") could be null and is dereferenced at line 85

background/fxa/oauth/FxAccountAbstractClient.java:103: error: NULL_DEREFERENCE
   object returned by body.getLong("code") could be null and is dereferenced at line 103

background/fxa/oauth/FxAccountAbstractClient.java:104: error: NULL_DEREFERENCE
   object returned by body.getLong("errno") could be null and is dereferenced at line 104

background/healthreport/ProfileInformationCache.java:142: error: RESOURCE_LEAK
   resource acquired by call to Scanner(...) at line 142 is not released after line 142
browserid:

browserid/JSONWebTokenUtils.java:163: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[0]) could be null and is dereferenced by call to String(...) at line 163

browserid/JSONWebTokenUtils.java:164: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[1]) could be null and is dereferenced by call to String(...) at line 164

browserid/JSONWebTokenUtils.java:165: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[2]) could be null and is dereferenced by call to byte2Hex(...) at line 165

browserid/JSONWebTokenUtils.java:217: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[0]) could be null and is dereferenced by call to String(...) at line 217

browserid/JSONWebTokenUtils.java:218: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[1]) could be null and is dereferenced by call to String(...) at line 218

browserid/JSONWebTokenUtils.java:219: error: NULL_DEREFERENCE
   object returned by decodeBase64(*parts[2]) could be null and is dereferenced by call to byte2Hex(...) at line 219
db:

db/LocalBrowserDB.java:594: error: NULL_DEREFERENCE
   object cursor last assigned on line 591 could be null and is dereferenced at line 594

db/LocalBrowserDB.java:803: error: NULL_DEREFERENCE
   object c last assigned on line 791 could be null and is dereferenced at line 803

db/LocalBrowserDB.java:840: error: NULL_DEREFERENCE
   object c last assigned on line 834 could be null and is dereferenced at line 840

db/LocalBrowserDB.java:861: error: NULL_DEREFERENCE
   object c last assigned on line 855 could be null and is dereferenced at line 861

db/LocalBrowserDB.java:906: error: NULL_DEREFERENCE
   object c last assigned on line 900 could be null and is dereferenced at line 906

db/LocalBrowserDB.java:1024: error: NULL_DEREFERENCE
   object c last assigned on line 1015 could be null and is dereferenced at line 1024

db/LocalBrowserDB.java:1071: error: NULL_DEREFERENCE
   object c last assigned on line 1064 could be null and is dereferenced at line 1071

db/LocalBrowserDB.java:1093: error: NULL_DEREFERENCE
   object c last assigned on line 1086 could be null and is dereferenced at line 1093

db/LocalBrowserDB.java:1154: error: NULL_DEREFERENCE
   object c last assigned on line 1147 could be null and is dereferenced at line 1154

db/LocalBrowserDB.java:1226: error: NULL_DEREFERENCE
   object c last assigned on line 1220 could be null and is dereferenced at line 1226

db/LocalBrowserDB.java:1296: error: NULL_DEREFERENCE
   object cursor last assigned on line 1285 could be null and is dereferenced at line 1296

db/LocalBrowserDB.java:1639: error: NULL_DEREFERENCE
   object pinnedSites last assigned on line 1637 could be null and is dereferenced at line 1639

db/LocalReadingListAccessor.java:45: error: NULL_DEREFERENCE
   object cursor last assigned on line 42 could be null and is dereferenced at line 45
overlays and prompts:

overlays/service/sharemethods/AddToReadingList.java:36: error: NULL_DEREFERENCE
   object returned by __new(class org.mozilla.gecko.db.LocalBrowserDB ).getReadingListAccessor() could be null and is dereferenced at line 36

prompts/PromptListAdapter.java:180: error: NULL_DEREFERENCE
   object provider last assigned on line 179 could be null and is dereferenced at line 180
FxA and Sync:

fxa/login/StateFactory.java:74: error: NULL_DEREFERENCE
   object returned by o.getBoolean("verified") could be null and is dereferenced at line 74

fxa/login/StateFactory.java:147: error: NULL_DEREFERENCE
   object returned by o.getBoolean("verified") could be null and is dereferenced at line 147

sync/CollectionKeys.java:120: error: NULL_DEREFERENCE
   object returned by cleartext.get("default") could be null and is dereferenced by call to arrayToKeyBundle(...) at line 120

sync/CryptoRecord.java:61: error: NULL_DEREFERENCE
   object returned by payload.get("ciphertext") could be null and is dereferenced at line 61

sync/CryptoRecord.java:62: error: NULL_DEREFERENCE
   object returned by payload.get("IV") could be null and is dereferenced at line 62

sync/Utils.java:231: error: NULL_DEREFERENCE
   object returned by __new(class org.mozilla.apache.commons.codec.binary.Base32 ).encodeAsString(sha1(utf8)) could be null and is dereferenced at line 231

sync/jpake/stage/ComputeFinalStage.java:28: error: NULL_DEREFERENCE
   object returned by jClient.jIncoming.get("type") could be null and is dereferenced at line 28

sync/jpake/stage/ComputeStepTwoStage.java:30: error: NULL_DEREFERENCE
   object returned by jClient.jIncoming.get("type") could be null and is dereferenced at line 30

sync/jpake/stage/VerifyPairingStage.java:27: error: NULL_DEREFERENCE
   object signerId last assigned on line 26 could be null and is dereferenced at line 27

sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java:517: error: NULL_DEREFERENCE
   object returned by AndroidBrowserBookmarksRepositorySession.parentGuidToIDMap.get(recordGUID) could be null and is dereferenced at line 517

sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java:804: error: NULL_DEREFERENCE
   object returned by AndroidBrowserBookmarksRepositorySession.parentGuidToIDMap.get("unfiled") could be null and is dereferenced at line 804

sync/repositories/android/AndroidBrowserHistoryDataAccessor.java:54: error: NULL_DEREFERENCE
   object returned by visit.get("date") could be null and is dereferenced at line 54

sync/repositories/android/PasswordsRepositorySession.java:618: error: NULL_DEREFERENCE
   object foundRecord last assigned on line 611 could be null and is dereferenced at line 618

sync/repositories/android/RepoUtils.java:53: error: RESOURCE_LEAK
   resource acquired by call to query(...) at line 52 is not released after line 53

sync/repositories/android/RepoUtils.java:65: error: RESOURCE_LEAK
   resource acquired by call to query(...) at line 64 is not released after line 65

sync/repositories/android/RepoUtils.java:74: error: RESOURCE_LEAK
   resource acquired by call to query(...) at line 73 is not released after line 74
Updater:

updater/UpdateService.java:377: error: RESOURCE_LEAK
   resource acquired by call to openConnectionWithProxy(...) at line 377 is not released after line 377

updater/UpdateService.java:594: error: RESOURCE_LEAK
   resource acquired by call to openConnectionWithProxy(...) at line 558 is not released after line 594
Widget:

widget/ActivityChooserModel.java:1095: error: NULL_DEREFERENCE
   object f last assigned on line 1094 could be null and is dereferenced at line 1095

widget/DefaultDoorHanger.java:114: error: NULL_DEREFERENCE
   object v last assigned on line 113 could be null and is dereferenced by call to styleInput(...) at line 114

widget/SwipeDismissListViewTouchListener.java:351: error: NULL_DEREFERENCE
   object returned by valueAnimator.getAnimatedValue() could be null and is dereferenced at line 351
Tabs, toolbars, webapps:

tabs/TabsGridLayout.java:177: error: NULL_DEREFERENCE
   object returned by animation.getAnimatedValue() could be null and is dereferenced at line 177

toolbar/PageActionLayout.java:180: error: NULL_DEREFERENCE
   object returned by getPageActionWithId(this,buttonClickedId) could be null and is dereferenced at line 180

toolbar/PageActionLayout.java:192: error: NULL_DEREFERENCE
   object returned by getPageActionWithId(this,buttonClickedId) could be null and is dereferenced at line 192


util/INIParser.java:51: error: NULL_DEREFERENCE
   object writer.out last assigned on line 48 could be null and is dereferenced by call to close() at line 51

util/INIParser.java:52: error: RESOURCE_LEAK
   resource acquired by call to FileWriter(...) at line 43 is not released after line 52

webapp/InstallHelper.java:138: error: RESOURCE_LEAK
   resource acquired by call to FileOutputStream(...) at line 127 is not released after line 138
Search:

/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java:232: error: NULL_DEREFERENCE
   object resultsUri last assigned on line 229 could be null and is dereferenced at line 232

/mobile/android/search/java/org/mozilla/search/providers/SearchEngineManager.java:575: error: NULL_DEREFERENCE
   object returned by engine.getName() could be null and is dereferenced at line 575
Third-party code:

/mobile/android/thirdparty/ch/boye/httpclientandroidlib/entity/mime/HttpBrowserCompatibleMultipart.java:70: error: NULL_DEREFERENCE
   object cd last assigned on line 69 could be null and is dereferenced by call to writeField(...) at line 70

/mobile/android/thirdparty/ch/boye/httpclientandroidlib/entity/mime/HttpBrowserCompatibleMultipart.java:74: error: NULL_DEREFERENCE
   object ct last assigned on line 73 could be null and is dereferenced by call to writeField(...) at line 74

/mobile/android/thirdparty/com/nineoldandroids/animation/AnimatorSet.java:129: error: NULL_DEREFERENCE
   object builder last assigned on line 127 could be null and is dereferenced at line 129

/mobile/android/thirdparty/com/nineoldandroids/animation/AnimatorSet.java:166: error: NULL_DEREFERENCE
   object returned by play(*items[i]) could be null and is dereferenced at line 166

/mobile/android/thirdparty/com/nineoldandroids/animation/AnimatorSet.java:735: error: NULL_DEREFERENCE
   object animNode last assigned on line 734 could be null and is dereferenced at line 735

/mobile/android/thirdparty/com/nineoldandroids/view/ViewPropertyAnimatorHC.java:500: error: NULL_DEREFERENCE
   object bundle last assigned on line 499 could be null and is dereferenced at line 500

/mobile/android/thirdparty/com/nineoldandroids/view/ViewPropertyAnimatorHC.java:691: error: NULL_DEREFERENCE
   object propertyBundle last assigned on line 690 could be null and is dereferenced at line 691

/mobile/android/thirdparty/com/nineoldandroids/view/ViewPropertyAnimatorPreHC.java:507: error: NULL_DEREFERENCE
   object bundle last assigned on line 506 could be null and is dereferenced at line 507

/mobile/android/thirdparty/com/nineoldandroids/view/ViewPropertyAnimatorPreHC.java:692: error: NULL_DEREFERENCE
   object propertyBundle last assigned on line 691 could be null and is dereferenced at line 692
FYI, this file contains the list of the remaining bugs, updated once per day with the latest version of infer.
http://people.mozilla.org/~sledru/reports/fennec-infer/bugs.txt
I wrote a script that pulls the content from the page in comment 12 and filters out the issues we don't care about, at least in the short term (i.e. tests & third party code):
  https://github.com/mcomella/infer-filter
Depends on: 1356679
Depends on: 1356693
Depends on: 1357629
Depends on: 1357630
Depends on: 1357783
Depends on: 1360151
Depends on: 1372555
Depends on: 1483176

We have now infer at review phase and, afaik, we aren't deal with the backlog

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Type: defect → task
You need to log in before you can comment on or make changes to this bug.