public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sjames at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114339] [14 regression] Tor miscompiled with -O2 -mavx -fno-vect-cost-model
Date: Thu, 14 Mar 2024 18:34:39 +0000	[thread overview]
Message-ID: <bug-114339-4-V2fMbdwTTI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114339-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114339

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
The assert is at
https://gitlab.torproject.org/tpo/core/tor/-/blob/tor-0.4.8.10/src/feature/client/entrynodes.c#L2072

```
(gdb) p delays
$3 = {{
    maximum = 21600,
    primary_delay = 600,
    nonprimary_delay = 3600
  }, {
    maximum = 345600,
    primary_delay = 5400,
    nonprimary_delay = 14400
  }, {
    maximum = 604800,
    primary_delay = 14400,
    nonprimary_delay = 64800
  }, {
    maximum = 9223372036854775807,
    primary_delay = 32400,
    nonprimary_delay = 129600
  }}
(gdb)
```

The bad loop (confirmed w/ novector pragma) is:
  for (i = 0; i < ARRAY_LENGTH(delays); ++i) {
    if (tdiff <= delays[i].maximum) {
      return is_primary ? delays[i].primary_delay : delays[i].nonprimary_delay;
    }
  }

  reply	other threads:[~2024-03-14 18:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 18:34 [Bug tree-optimization/114339] New: " sjames at gcc dot gnu.org
2024-03-14 18:34 ` sjames at gcc dot gnu.org [this message]
2024-03-14 18:35 ` [Bug tree-optimization/114339] " sjames at gcc dot gnu.org
2024-03-14 18:44 ` sjames at gcc dot gnu.org
2024-03-14 18:54 ` sjames at gcc dot gnu.org
2024-03-14 19:10 ` [Bug tree-optimization/114339] [14 regression] Tor miscompiled with -O2 -mavx -fno-vect-cost-model since r14-6822 jakub at gcc dot gnu.org
2024-03-14 20:52 ` tnfchris at gcc dot gnu.org
2024-03-14 21:26 ` pinskia at gcc dot gnu.org
2024-03-14 21:28 ` jakub at gcc dot gnu.org
2024-03-14 21:31 ` pinskia at gcc dot gnu.org
2024-03-14 21:33 ` [Bug target/114339] " pinskia at gcc dot gnu.org
2024-03-14 21:34 ` [Bug target/114339] [13/14 " pinskia at gcc dot gnu.org
2024-03-14 21:39 ` pinskia at gcc dot gnu.org
2024-03-14 21:39 ` jakub at gcc dot gnu.org
2024-03-14 21:42 ` jakub at gcc dot gnu.org
2024-03-14 22:04 ` jakub at gcc dot gnu.org
2024-03-15 10:04 ` cvs-commit at gcc dot gnu.org
2024-03-15 10:30 ` [Bug target/114339] [13 " jakub at gcc dot gnu.org
2024-03-15 23:29 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:42 ` jakub at gcc dot gnu.org

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=bug-114339-4-V2fMbdwTTI@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).