public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit @ 2022-11-03 13:09 skabe at vega dot pgw.jp 2022-11-03 13:11 ` [Bug libc/29746] ppoll() " skabe at vega dot pgw.jp ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: skabe at vega dot pgw.jp @ 2022-11-03 13:09 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=29746 Bug ID: 29746 Summary: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: skabe at vega dot pgw.jp CC: drepper.fsp at gmail dot com Target Milestone: 2.36 glibc version: 2.36 (git commit 19535f3b57) host/build triplets: i586-redhat-linux ../configure --prefix=/usr/local/glibc2 --with-headers=/usr/include --enable-bind-now --build=i586-redhat-linux --host=i586-redhat-linux kernel: Linux rocky9.five.ten 5.14.0-168.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 23 11:43:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux gcc: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i586-redhat-linux/11/lto-wrapper Target: i586-redhat-linux Configured with: ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.rockylinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --without-isl --enable-gnu-indirect-function --with-tune=generic --with-arch=i586 --build=i586-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC) binutils: binutils-2.35.2-17.el9.v1.i586 Additional URL: https://github.com/systemd/systemd/issues/25176 Consider the following code as poll.c: ``` #define _GNU_SOURCE 1 #define _TIME_BITS 64 #define _FILE_OFFSET_BITS 64 #include <stdio.h> #include <sys/time.h> #include <poll.h> void wait1(void); void wait1(void) { struct pollfd fds[1]; int nfds=0; struct timespec ts = {1, 0}; ppoll(fds, nfds, &ts, NULL); } ``` compiling as below shows no problem: $ gcc -I/usr/local/glibc2/include/ -march=i686 -m32 -O -g -c poll.c $ objdump -t poll.o|grep ppoll 00000000 *UND* 00000000 __ppoll64 ppoll() is properly redirected to __ppoll64 by -D_TIME_BITS=64. Now add -D_FORTIFY_SOURCE=2: $ gcc -I/usr/local/glibc2/include/ -march=i686 -m32 -O -g -D_FORTIFY_SOURCE=2 -c poll.c $ objdump -t poll.o|grep ppoll 00000000 *UND* 00000000 ppoll switching to __ppoll is nullified(bad). Application passes paramters in 64bit time_t, whereas kernel will parse data as 32bit time_t, which will upset ppoll(). I could not crank and a patch, since _TIME_BITS=64 involves heavy use of asm and attributes trickery. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit 2022-11-03 13:09 [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit skabe at vega dot pgw.jp @ 2022-11-03 13:11 ` skabe at vega dot pgw.jp 2022-11-03 15:56 ` [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit schwab@linux-m68k.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: skabe at vega dot pgw.jp @ 2022-11-03 13:11 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=29746 Kabe <skabe at vega dot pgw.jp> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ppoll\ does not switch to |ppoll() does not switch to |__ppoll64 when |__ppoll64 when |-D_TIME_BITS=64 and |-D_TIME_BITS=64 and |-D_FORTIFY_SOURCE=2 is |-D_FORTIFY_SOURCE=2 is |given on 33bit |given on 33bit -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit 2022-11-03 13:09 [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit skabe at vega dot pgw.jp 2022-11-03 13:11 ` [Bug libc/29746] ppoll() " skabe at vega dot pgw.jp @ 2022-11-03 15:56 ` schwab@linux-m68k.org 2022-11-03 16:20 ` adhemerval.zanella at linaro dot org 2022-11-08 16:46 ` adhemerval.zanella at linaro dot org 3 siblings, 0 replies; 5+ messages in thread From: schwab@linux-m68k.org @ 2022-11-03 15:56 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=29746 Andreas Schwab <schwab@linux-m68k.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ppoll() does not switch to |ppoll() does not switch to |__ppoll64 when |__ppoll64 when |-D_TIME_BITS=64 and |-D_TIME_BITS=64 and |-D_FORTIFY_SOURCE=2 is |-D_FORTIFY_SOURCE=2 is |given on 33bit |given on 32bit -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit 2022-11-03 13:09 [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit skabe at vega dot pgw.jp 2022-11-03 13:11 ` [Bug libc/29746] ppoll() " skabe at vega dot pgw.jp 2022-11-03 15:56 ` [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit schwab@linux-m68k.org @ 2022-11-03 16:20 ` adhemerval.zanella at linaro dot org 2022-11-08 16:46 ` adhemerval.zanella at linaro dot org 3 siblings, 0 replies; 5+ messages in thread From: adhemerval.zanella at linaro dot org @ 2022-11-03 16:20 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=29746 Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at linaro dot o | |rg Assignee|unassigned at sourceware dot org |adhemerval.zanella at linaro dot o | |rg --- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> --- I will take a look. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit 2022-11-03 13:09 [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit skabe at vega dot pgw.jp ` (2 preceding siblings ...) 2022-11-03 16:20 ` adhemerval.zanella at linaro dot org @ 2022-11-08 16:46 ` adhemerval.zanella at linaro dot org 3 siblings, 0 replies; 5+ messages in thread From: adhemerval.zanella at linaro dot org @ 2022-11-08 16:46 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=29746 Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Target Milestone|2.36 |2.37 --- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> --- Fixed on 2.37. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-08 16:46 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-11-03 13:09 [Bug libc/29746] New: ppoll\ does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 33bit skabe at vega dot pgw.jp 2022-11-03 13:11 ` [Bug libc/29746] ppoll() " skabe at vega dot pgw.jp 2022-11-03 15:56 ` [Bug libc/29746] ppoll() does not switch to __ppoll64 when -D_TIME_BITS=64 and -D_FORTIFY_SOURCE=2 is given on 32bit schwab@linux-m68k.org 2022-11-03 16:20 ` adhemerval.zanella at linaro dot org 2022-11-08 16:46 ` adhemerval.zanella at linaro dot org
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).