Opened 7 months ago

Closed 7 months ago

#28852 closed defect (fixed)

Remove memset() from get_token_arguments.

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: startup performance
Cc: Actual Points: 0
Parent ID: #28481 Points:
Reviewer: catalyst Sponsor: Sponsor8-can


After other changes in the parent ticket, about 2% of our startup time is calling memset() in get_token_arguments. This memset() is completely unnecessary if the rest of the function is written correctly (which it is).

Child Tickets

Change History (6)

comment:1 Changed 7 months ago by nickm

Actual Points: 0
Status: assignedneeds_review

Branch is ticket28852; PR is

comment:2 Changed 7 months ago by nickm

Owner: changed from nick,m to nickm
Status: needs_reviewassigned

comment:3 Changed 7 months ago by nickm

Status: assignedneeds_review

comment:4 Changed 7 months ago by dgoulet

Reviewer: catalyst

comment:5 Changed 7 months ago by catalyst

Status: needs_reviewmerge_ready

Looks good to me! I'm not completely convinced that we check tok->n_args every place we need to, but that's an existing problem that I think isn't made worse by this change, because we already weren't copying any terminating null pointer that we might have gotten when we were calling memset().

comment:6 Changed 7 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Thanks! Merged to master.

Note: See TracTickets for help on using tickets.