bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The readdir library recognizes files as folders while getline is used


From: Евгений
Subject: The readdir library recognizes files as folders while getline is used
Date: Mon, 12 Jun 2023 11:47:07 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/gawk/src=/usr/src/debug/gawk -flto=auto -DNDEBUG uname output: Linux Yoga-12 6.1.31-2-MANJARO #1 SMP PREEMPT_DYNAMIC Sun Jun  4 12:31:46 UTC 2023 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Gawk Version: 5.2.1 (downgraded from 5.2.2)

Attestation 1:
    I have read https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
    Yes

Attestation 2:
    I have not modified the sources before building gawk.
    True

Description:
    If the library `readdir` in 5.2.2 version is loaded, the `getline` instruction works incorrectly while reading a file. It recognizes files as directories and returns an error. The 5.2.1 version does not have this issue and works properly.

Repeat-By:
    #!/usr/bin/gawk -f
    @load "readdir"
    BEGIN{
        while((getline < "file.txt") > 0){
            print $0
        }
    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]