public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libquadmath/99203] New: Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp
@ 2021-02-22 15:57 zeccav at gmail dot com
2021-02-23 8:59 ` [Bug libquadmath/99203] " marxin at gcc dot gnu.org
2021-12-17 9:33 ` fxcoudert at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: zeccav at gmail dot com @ 2021-02-22 15:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99203
Bug ID: 99203
Summary: Undefined behaviour in libquadmath file print_fp.c
function __quadmath_printf_fp
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libquadmath
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
Target Milestone: ---
! from fmt_en.f90
! must be compiled and run
! gfortran compiler needs not be sanitized
! must load sanitized libquadmath.so.0
! ldd a.out -> libquadmath.so.0 =>
/home/vitti/local/gcc-150221-undefined/lib64/libquadmath.so.0
!../../../gcc-150221/libquadmath/printf/printf_fp.c:762:4: runtime error:
passing zero to ctz(), which is not a valid argument
!../../../gcc-150221/libquadmath/printf/printf_fp.c:762: runtime error: passing
zero to ctz(), which is not a valid argument
! printf_fp.c:762 -> "count_trailing_zeros (cnt_l, tmp[0]);"
write(*, "(en15.2)") real(-.44444,kind=10)
write(*, "(en15.2)") real(-.44444,kind=16)
end
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libquadmath/99203] Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp
2021-02-22 15:57 [Bug libquadmath/99203] New: Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp zeccav at gmail dot com
@ 2021-02-23 8:59 ` marxin at gcc dot gnu.org
2021-12-17 9:33 ` fxcoudert at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-23 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99203
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |63426
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-02-23
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, full backtrace:
/home/marxin/Programming/gcc2/libquadmath/printf/printf_fp.c:762:4: runtime
error: passing zero to ctz(), which is not a valid argument
#0 0x7ffff719692b in __quadmath_printf_fp
/home/marxin/Programming/gcc2/libquadmath/printf/printf_fp.c:762
#1 0x7ffff71d6884 in quadmath_snprintf
/home/marxin/Programming/gcc2/libquadmath/printf/quadmath-printf.c:266
#2 0x7ffff75ccbab (/usr/lib64/libgfortran.so.5+0x252bab)
#3 0x7ffff75d07df (/usr/lib64/libgfortran.so.5+0x2567df)
#4 0x7ffff75c72b4 (/usr/lib64/libgfortran.so.5+0x24d2b4)
#5 0x7ffff75c7973 (/usr/lib64/libgfortran.so.5+0x24d973)
#6 0x400d85 in checkfmt.0
(/home/marxin/Programming/testcases/a.out+0x400d85)
#7 0x40160e in MAIN__ (/home/marxin/Programming/testcases/a.out+0x40160e)
#8 0x4024e6 in main (/home/marxin/Programming/testcases/a.out+0x4024e6)
#9 0x7ffff6fc9b24 in __libc_start_main (/lib64/libc.so.6+0x27b24)
#10 0x40096d in _start (/home/marxin/Programming/testcases/a.out+0x40096d)
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
[Bug 63426] [meta-bug] Issues found with -fsanitize=undefined
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libquadmath/99203] Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp
2021-02-22 15:57 [Bug libquadmath/99203] New: Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp zeccav at gmail dot com
2021-02-23 8:59 ` [Bug libquadmath/99203] " marxin at gcc dot gnu.org
@ 2021-12-17 9:33 ` fxcoudert at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2021-12-17 9:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99203
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
This is present in upstream (glibc), probably should be reported there:
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdio-common/printf_fp.c;h=75bbadbaeb6cdc55f09ab3e806cc9ab3e958c2e6;hb=HEAD
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-17 9:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 15:57 [Bug libquadmath/99203] New: Undefined behaviour in libquadmath file print_fp.c function __quadmath_printf_fp zeccav at gmail dot com
2021-02-23 8:59 ` [Bug libquadmath/99203] " marxin at gcc dot gnu.org
2021-12-17 9:33 ` fxcoudert at gcc dot gnu.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).