public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Amit Choudhary <amitchoudhary0523@gmail.com>
To: Dan Raymond <draymond@foxvalley.net>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Fastest String Search Algorithm.
Date: Sat, 12 Jun 2021 09:30:11 +0530	[thread overview]
Message-ID: <CAFf+5zhz5GO-9u9AACGaviUWOYzkaDwuzyJPCMXxc1qy9=NRag@mail.gmail.com> (raw)
In-Reply-To: <a54170ac-e47e-5dbf-dc9a-6f70cf97acbf@foxvalley.net>

On Sat, Jun 12, 2021, 1:32 AM Dan Raymond <draymond@foxvalley.net> wrote:
  By the way your previous argument

> that antivirus software uses strstr() to search for virus signatures is
> false.  A virus signature is not a NUL-terminated string.
>


I never said that strstr() is used in antivirus software.

I only said that antivirus software use long needles for searching and I
said this because someone had put forth the argument that long needles
don't occur in real world.

But as you said that in real world anything can happen then the current
version of strstr() is susceptible to denial of service attack because for
long needles (32 KB, etc.), strstr() is slow.

But one thing is very ironic. On one hand people say that anything can
happen in real world and on the other they contradict this by saying that
long needles don't occur in real world.

If anything can happen in real world, then strstr() should be testef for 10
MB long needle in 100 MB long haystack.

But this is not tested. Actually, strstr() has not been tested for needles
beyond 1 KB and haystack beyong 65 KB.

So, the argument that anything can happen in the real world in not
reflected in the benchmark tests for strstr().

But, please don't ask me to fix benchmark tests.

Regards,
Amit

  reply	other threads:[~2021-06-12  4:00 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 10:31 Wilco Dijkstra
2021-06-09 11:42 ` Amit Choudhary
2021-06-09 12:05   ` Phil Blundell
2021-06-09 12:11     ` Adhemerval Zanella
2021-06-09 12:22       ` Amit Choudhary
2021-06-09 12:55         ` Adhemerval Zanella
2021-06-09 13:18           ` Amit Choudhary
2021-06-09 13:32             ` Amit Choudhary
2021-06-09 13:40             ` Adhemerval Zanella
2021-06-09 14:08               ` Amit Choudhary
2021-06-09 14:25                 ` Phil Blundell
2021-06-09 12:18     ` Amit Choudhary
2021-06-09 13:48       ` Phil Blundell
2021-06-09 21:44   ` Wilco Dijkstra
2021-06-10  2:42     ` Amit Choudhary
2021-06-10  3:23       ` Dan Raymond
2021-06-10  4:19         ` Amit Choudhary
2021-06-10  9:44       ` Wilco Dijkstra
2021-06-10 11:08         ` Amit Choudhary
2021-06-10 16:53           ` Amit Choudhary
2021-06-10 20:04             ` Amit Choudhary
2021-06-11  8:28               ` Amit Choudhary
2021-06-11 11:45           ` Wilco Dijkstra
2021-06-11 12:42             ` Amit Choudhary
2021-06-11 13:39               ` Amit Choudhary
2021-06-11 13:46               ` Wilco Dijkstra
2021-06-11 15:52                 ` Amit Choudhary
2021-06-11 19:14                   ` Amit Choudhary
2021-06-11 19:26                     ` Paul Eggert
2021-06-11 19:41                       ` Amit Choudhary
2021-06-11 20:00                         ` Dan Raymond
2021-06-12  4:00                           ` Amit Choudhary [this message]
2021-06-12  4:18                             ` Amit Choudhary
2021-06-12  7:16                               ` [Final testing with benchmark tests] " Amit Choudhary
2021-06-12  8:01                                 ` Paul Zimmermann
2021-06-12  8:41                                   ` Amit Choudhary
2021-06-12 13:29                                     ` Amit Choudhary
2021-06-12 10:56                                   ` Siddhesh Poyarekar
2021-06-12 13:47                                     ` Amit Choudhary
2021-06-13  3:32                                       ` Siddhesh Poyarekar
2021-06-13  4:06                                         ` Amit Choudhary
2021-06-11 13:57               ` Paul Zimmermann
2021-06-11 14:04                 ` Amit Choudhary
2021-06-11 14:16                   ` Paul Zimmermann
2021-06-11 14:27                     ` Amit Choudhary
  -- strict thread matches above, loose matches on Subject: below --
2021-06-07 16:17 Wilco Dijkstra
2021-06-07 17:33 ` Florian Weimer
2021-06-08  4:52   ` Siddhesh Poyarekar
2021-06-07 14:46 Wilco Dijkstra
2021-06-07 15:21 ` Amit Choudhary
2021-06-07 16:02   ` Amit Choudhary
2021-06-07 16:04   ` Wilco Dijkstra
2021-06-07 10:53 Wilco Dijkstra
2021-06-07 12:33 ` Amit Choudhary
2021-06-08  6:33 ` Amit Choudhary
2021-06-08  7:25   ` Amit Choudhary
2021-06-06 14:15 Amit Choudhary
2021-06-06 14:30 ` H.J. Lu
2021-06-06 18:38   ` Amit Choudhary
2021-06-09  5:33   ` Guo, Wangyang
2021-06-09  6:18     ` Amit Choudhary
2021-06-09  6:50       ` Siddhesh Poyarekar
2021-06-09  7:38       ` Phil Blundell
2021-06-09  7:54         ` Amit Choudhary
2021-06-09  9:26           ` Phil Blundell
2021-06-06 17:58 ` Paul Eggert
2021-06-06 18:26   ` Amit Choudhary
2021-06-07 11:48     ` Amit Choudhary
2021-06-07 20:12       ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFf+5zhz5GO-9u9AACGaviUWOYzkaDwuzyJPCMXxc1qy9=NRag@mail.gmail.com' \
    --to=amitchoudhary0523@gmail.com \
    --cc=draymond@foxvalley.net \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).