Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2021 02:39:56 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib
Message-ID:  <68440f27-7b70-cc1f-d646-9669c4093838@FreeBSD.org>
In-Reply-To: <0a0ac901-c1d2-54d7-d585-2856ae4fe6ea@FreeBSD.org>
References:  <202006181809.05II9G8p054025@repo.freebsd.org> <YCbeabF%2BBSrpQep0@raichu> <0a0ac901-c1d2-54d7-d585-2856ae4fe6ea@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--21Mw8Q896MjFg79SqwtcPuvVMLKe3MxM0
Content-Type: multipart/mixed; boundary="0XaxRnIbm9Q0ToP7C1wL5T9SComHIRqut";
 protected-headers="v1"
From: Jung-uk Kim <jkim@FreeBSD.org>
To: Mark Johnston <markj@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-ID: <68440f27-7b70-cc1f-d646-9669c4093838@FreeBSD.org>
Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src
 usr.bin/lex usr.bin/lex/lib
References: <202006181809.05II9G8p054025@repo.freebsd.org>
 <YCbeabF+BSrpQep0@raichu> <0a0ac901-c1d2-54d7-d585-2856ae4fe6ea@FreeBSD.org>
In-Reply-To: <0a0ac901-c1d2-54d7-d585-2856ae4fe6ea@FreeBSD.org>

--0XaxRnIbm9Q0ToP7C1wL5T9SComHIRqut
Content-Type: multipart/mixed;
 boundary="------------A6E82E690D1DA14BA587D34B"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------A6E82E690D1DA14BA587D34B
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 21. 2. 13., Jung-uk Kim wrote:
> On 21. 2. 12., Mark Johnston wrote:
>> On Thu, Jun 18, 2020 at 06:09:16PM +0000, Jung-uk Kim wrote:
>>> Author: jkim
>>> Date: Thu Jun 18 18:09:16 2020
>>> New Revision: 362333
>>> URL: https://svnweb.freebsd.org/changeset/base/362333
>>>
>>> Log:
>>>   MFV:	r362286
>>>  =20
>>>   Merge flex 2.6.4.
>>
>> This seems to have introduced a regression: input() now returns 0
>> instead of EOF to indicate that the end of input was reached.  This ha=
s
>> been reported in a few places:
>>
>> https://github.com/westes/flex/issues/448
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D911415
>>
>> It breaks the scanner used by libdtrace, and as a result dtrace is
>> unable to resolve some probe argument types:
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253440
>>
>> I have a small patch to libdtrace which works around this.  The upstre=
am
>> commit that introduced the change is fairly old at this point, and
>> upstream seems somewhat unresponsive, so I'm not sure it'll get
>> reverted.  Some other scanners in the tree look like they'd be affecte=
d,
>> like crypto/heimdal/lib/asn1/lex.l or
>> sys/contrib/dev/acpica/compiler/aslsupport.l, so I'm wondering if we
>> should revert this particular change for 13.0.  Certainly we should fi=
x
>> the DTrace bug one way or another for 13.0.
>=20
> I think it does not make much sense and we should revert the upstream
> change.  Does the attached patch work for you?

Now I believe the author wanted Lex compatibility.  Maybe we should do
the attached patch instead?

Jung-uk Kim

--------------A6E82E690D1DA14BA587D34B
Content-Type: text/x-patch; charset=UTF-8;
 name="flex.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="flex.diff"

diff --git a/contrib/flex/src/flex.skl b/contrib/flex/src/flex.skl
index 242645f53245..c23b944ea473 100644
--- a/contrib/flex/src/flex.skl
+++ b/contrib/flex/src/flex.skl
@@ -1863,7 +1863,11 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( yywrap( M4_YY_CALL_ONLY_ARG ) )
+#ifdef YY_FLEX_LEX_COMPAT
 						return 0;
+#else
+						return EOF;
+#endif
=20
 					if ( ! YY_G(yy_did_buffer_switch_on_eof) )
 						YY_NEW_FILE;

--------------A6E82E690D1DA14BA587D34B--

--0XaxRnIbm9Q0ToP7C1wL5T9SComHIRqut--

--21Mw8Q896MjFg79SqwtcPuvVMLKe3MxM0
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAmAngkwFAwAAAAAACgkQfJ+WJvzb8UYn
tgf/XMpmOKNO2YwRToNKgd/lE8I5iQOlFCnP2FE43TRvkjOchjhKeCez4cVPrXoJXywq7oz4JxXR
EY5D9YZFy9njlOko1/krH2a829LWsdUZF4jKgU2w2GMvB7C7L3nKGSAl88AUHiCEtRjUUq5t4vwD
wlaKvn5tSLBUyB9cjUNrbYgniLr4aVvZ39ZbHJqxRe+TuZvdV7BASHOtry98VeZGpRmXygN6aT3H
n8d7wRvuYKXZnMCiOJN3T58/UZJYds41LAVY/DkktiXeN5YmY3m/w0Sa5LkCiKQSYmdiHY0ZH0lv
06MbjcUhQfbhIzWxSFLlyJZyTKBv/fhFHmP4U1Mlkg==
=go0i
-----END PGP SIGNATURE-----

--21Mw8Q896MjFg79SqwtcPuvVMLKe3MxM0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68440f27-7b70-cc1f-d646-9669c4093838>