Opened 14 months ago

Last modified 9 months ago

#31638 assigned task

config: Always check for valid function arguments at the start of each function

Reported by: teor Owned by: nickm
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 042-deferred-20190918, 043-deferred
Cc: nickm, teor, gaba Actual Points:
Parent ID: #29211 Points:
Reviewer: Sponsor:


Some of the new and refactored config functions check if their arguments are NULL (or otherwise valid). Others don't.

We should consistently check for valid arguments at the start of every function. If there are any unusual validity conditions, we should explain them in a function comment.

If we skip validation, we should explain why in a comment, where we would usually do validation.

I'm also open to general exceptions. I'm not sure if we have coding standards here. But it would be nice to catch as many future bugs as we can, as early as we can.

Child Tickets

Change History (4)

comment:1 Changed 14 months ago by nickm

Keywords: 042-deferred-20190918 added
Milestone: Tor: 0.4.2.x-finalTor: 0.4.3.x-final

Defer numerous 0.4.2 tickets to 0.4.3.

comment:2 Changed 9 months ago by gaba

Keywords: network-team-roadmap-august removed

comment:3 Changed 9 months ago by nickm

Keywords: 043-deferred added

All 0.4.3.x tickets without 043-must, 043-should, or 043-can are about to be deferred.

comment:4 Changed 9 months ago by nickm

Milestone: Tor: 0.4.3.x-finalTor: unspecified
Note: See TracTickets for help on using tickets.