After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773272 - Support flex 2.6.1 and higher
Support flex 2.6.1 and higher
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-20 13:12 UTC by Jan de Groot
Modified: 2017-09-10 08:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support changed EOF with flex 2.6.1 (2.70 KB, patch)
2016-10-20 13:12 UTC, Jan de Groot
committed Details | Review

Description Jan de Groot 2016-10-20 13:12:10 UTC
Created attachment 338098 [details] [review]
Support changed EOF with flex 2.6.1

When compiling cinnamon, g-ir-scanner goes into an infinite loop when gobject-introspection is built from git with flex 2.6.1.

This has been debugged and fixed in https://bugs.archlinux.org/task/51396
Comment 1 Colin Walters 2016-10-20 15:01:01 UTC
Review of attachment 338098 [details] [review]:

Wait, what?  And absolutely no rationale in the commit message.  Why didn't he change it to 42 just for fun?

Is there an upstream issue for this yet?

Anyways, *this* patch looks like an OK workaround, thanks.
Comment 2 Jan Alexander Steffens (heftig) 2017-02-02 11:57:56 UTC
This patch has been sitting in commit_now status for quite a while...
Comment 3 Jan Alexander Steffens (heftig) 2017-02-02 13:24:16 UTC
(In reply to Colin Walters from comment #1)

To be fair, it seems this changes the behavior (back?) to match the
documentation, which has been stating, for at least 16 years:

> If it [yywrap] returns true (non-zero), then
> the scanner terminates, returning 0 to its caller.

> If input() encounters an end-of-file the normal yywrap() processing is
> done.  A "real" end-of-file is returned by input() as EOF.

https://github.com/westes/flex/blob/609af5775f7277679dc3bd966b36f04cf7ccf2a8/doc/flex.texi#L1572

https://github.com/westes/flex/blob/609af5775f7277679dc3bd966b36f04cf7ccf2a8/doc/flex.texi#L4550
Comment 4 Rico Tzschichholz 2017-09-10 08:19:55 UTC
commit cf04292691625e8abcd8cc8af9436809f273e5a0
Author: Jan de Groot <jgc@archlinux.org>
Date:   Thu Oct 20 12:14:19 2016 +0000

    giscanner: fix EOF check with flex >= 2.6.1
    
    It looks like flex 2.6.1 changed [1] the return code for EOF in
    yyinput.  Therefore, use the right value depending on the version of
    flex which generates the lexer.
    
    [1] https://github.com/westes/flex/commit/f863c9490e6912ffcaeb12965fb3a567a10745ff