This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/15829] New: fgetc(stdin) does not return EOF on arm


http://sourceware.org/bugzilla/show_bug.cgi?id=15829

            Bug ID: 15829
           Summary: fgetc(stdin) does not return EOF on arm
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: eyeswide at gmail dot com

Created attachment 7138
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7138&action=edit
example program

when reading from stdin fgetc returns 255 instead of the expected EOF(-1). This
occurs at least on armv6 and armv7 architectures, but not on x86_64.

tested on:
archlinuxarm:
  libc 2.17
  gcc 4.7.2
  example file info:  /usr/lib/libc-2.17.so: ELF 32-bit LSB  shared object,
ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs),
                    | BuildID[sha1]=7ebc01bb3edad88cffa01cf9ed53dced54a2a668,
for GNU/Linux 2.6.27, not stripped

debian:
  libc 2.13
  /lib/arm-linux-gnueabihf/libc-2.13.so: ELF 32-bit LSB shared object, ARM,
version 1 (SYSV), dynamically linked (uses shared libs),
                    | BuildID[sha1]=0xc3baf877cd87aff49ddf388e7779b4661f8e2462,
for GNU/Linux 2.6.26, stripped

to reproduce compile the attached code and run: echo foo | testfgetc
reading ctrl-d also returns 255.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]