bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: arnold@skeeve.com
To: eggert@cs.ucla.edu, arsen@aarsen.me
Cc: sam@gentoo.org, concord@gentoo.org, bug-gnulib@gnu.org,
	bug-gawk@gnu.org,  arnold@skeeve.com
Subject: Re: Clang-built Gawk 5.2.1 regex oddity
Date: Fri, 06 Jan 2023 05:21:03 -0700	[thread overview]
Message-ID: <202301061221.306CL3cx009554@freefriends.org> (raw)
In-Reply-To: <87bkncy3vl.fsf@aarsen.me>

Thanks for the update.

Paul, let's leave dfa.c as is, with the modified code.
It's much easier to read anyway.

Thanks,

Arnold

Arsen Arsenović <arsen@aarsen.me> wrote:

> Hi,
>
> Paul Eggert <eggert@cs.ucla.edu> writes:
>
> > This is a serious bug in Clang: it generates incorrect machine code.
> >
> > The code that Clang generates for the following (gawk/support/dfa.c lines
> > 1141-1143):
> >
> >     ((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR
> >       ? dfaerror : dfawarn)
> >      (_("character class syntax is [[:space:]], not [:space:]")));
> >
> > is immediately followed by the code generated for the following
> > (gawk/support/dfa.c line 1015):
> >
> >                     dfaerror (_("invalid character class"));
> >
> > and this is incorrect because the two source code regions are not connected
> > with each other.
>
> This is now fixed in Clang:
> https://reviews.llvm.org/rGcf8fd210a35c8e93136cb8edc5c6a2e818dc1b1d
>
> Happy hacking!
> -- 
> Arsen Arsenović


  reply	other threads:[~2023-01-06 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221230000119.hyui6umnspuyzqum@bubbles>
     [not found] ` <202212300913.2BU9DV6V030160@freefriends.org>
     [not found]   ` <6DADB0FC-87EE-4028-91DF-C93A968A8982@gentoo.org>
2023-01-01 19:06     ` Clang-built Gawk 5.2.1 regex oddity arnold
2023-01-02  6:10       ` Paul Eggert
2023-01-03  2:14         ` Sam James
2023-01-03  2:43           ` Sam James
2023-01-05 23:06         ` Arsen Arsenović
2023-01-06 12:21           ` arnold [this message]
2023-01-13  7:03           ` Sam James

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=202301061221.306CL3cx009554@freefriends.org \
    --to=arnold@skeeve.com \
    --cc=arsen@aarsen.me \
    --cc=bug-gawk@gnu.org \
    --cc=bug-gnulib@gnu.org \
    --cc=concord@gentoo.org \
    --cc=eggert@cs.ucla.edu \
    --cc=sam@gentoo.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).