Project

General

Profile

Actions

Fix #12049

open

replace snprintf(s,...); x = strlen(s); with x = snprintf...

Added by Loïc Dachary almost 9 years ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
low-hanging-fruit
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

for performances


Files

research_snprintf.txt (139 KB) research_snprintf.txt Benjamin Sesia, 06/18/2015 03:55 PM
Actions #1

Updated by Loïc Dachary almost 9 years ago

  • Tags set to low-hanging-fruit
Actions #2

Updated by Thomas Laumondais almost 9 years ago

I work on it !

Actions #3

Updated by Benjamin Sesia almost 9 years ago

I checked each snprintf of the project under ceph\src but couldn't find any of 'snprintf(s,...)' followed by a 'x = strlen(s);'
Attached : result of the research

Actions #4

Updated by Loïc Dachary almost 9 years ago

It looks like you may have missed a few such as https://github.com/ceph/ceph/blob/master/src/os/FileStore.cc#L1216 . Given the large number of snprintf lines, maybe it's worth trying to use a script to spot those that are of interest ?

Actions #5

Updated by Nathan Cutler over 8 years ago

Hint:

$ cd src/
$ grep -r -i3 strlen | less

text search for "snprintf" yields some positives

Actions #6

Updated by Patrick Donnelly over 4 years ago

  • Status changed from 12 to New
Actions #7

Updated by Laura Flores over 1 year ago

  • Translation missing: en.field_tag_list set to low-hanging-fruit
Actions

Also available in: Atom PDF