Opened 6 years ago

Closed 6 years ago

#13284 closed defect (fixed)

Stop spurious clang shallow analysis null pointer errors

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Keywords: tor-router clang-analyze
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When clang does shallow analysis (the default when building under Xcode), it finds 4 null pointer errors.

We resolve this by using tor_assert() to prove that the pointers aren't null.

I'll attach a patch to this ticket as soon as I've created the changes entry.

version: 2.6.0-alpha
4fcc8d4e55256b96de400ad8cb04be451471853c (with #13280)
5190ec0bc4c22d7bab756e21db6e357ba07379c4 (origin)

Child Tickets

Attachments (1)

0001-Stop-spurious-clang-shallow-analysis-null-pointer-er.patch (2.9 KB) - added by teor 6 years ago.
Amend patch to describe changes as code refactoring

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by Sebastian

hey teor, you're submitting a lot of patches lately, which is awesome. Do you have a place to put git branches like github/something else? That would make dealing with it a bit quicker :)

If not, it's still awesome you're making patches!

comment:2 Changed 6 years ago by teor

Status: newneeds_review

I'll see if I can set something up on github. Shouldn't be that hard :-)

comment:3 Changed 6 years ago by Sebastian

Minor nitpick: It's not a bugfix if it didn't fix a bug, it's a code refactoring

Changed 6 years ago by teor

Amend patch to describe changes as code refactoring

comment:4 Changed 6 years ago by nickm

Milestone: Tor: 0.2.6.x-final
Resolution: fixed
Status: needs_reviewclosed

Looks fine to me. Merged it to master. Thank you!

Note: See TracTickets for help on using tickets.