Re: Buffer overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Timo Sirainen wrote:
On Thu, 2007-08-30 at 21:09 -0700, Linus Torvalds wrote:
On Fri, 31 Aug 2007, Timo Sirainen wrote:
Perhaps because your patch was using a totally nonstandard and slow
interface, and had nasty string declaration issues, as people even pointed
out to you.
Slow?
Having a string library, and then implementing "str_append()" with a strlen() sounds pretty disgusting to me. Gcc could have optimized the strlen() away for constant string arguments, but since you made the thing out-of-line, it can't do that any more.

So yes, I bet there are faster string libraries out there.

Oh, well that's easy to fix. But I don't think the speed matters much in
string manipulation, it's usually not done in performance critical
paths.


In git it is, as strings are manipulated en masse in order to traverse
history, look up paths from index/filesystem etc, etc.

--
Andreas Ericsson                   andreas.ericsson@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux