[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanit
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20 |
Date: |
Tue, 28 Mar 2023 10:37:52 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30279
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c61b7b7b8ea5e3a55b4642dade4798e5c896df66
commit c61b7b7b8ea5e3a55b4642dade4798e5c896df66
Author: Alan Modra <amodra@gmail.com>
Date: Tue Mar 28 20:25:26 2023 +1030
Avoid undefined behaviour in m68hc11 md_begin
Given p = A where p is a pointer to some type and A is an array of
that type, then the expression p - 1 + 1 evokes undefined behaviour
according to the C standard.
gcc-13 -fsanitize=address,undefined complains about this, but not
where the undefined behaviour actually occurs at tc-m68hc11.c:646.
Instead you get an error: "tc-m68hc11.c:708:20: runtime error: store
to address 0x62600000016c with insufficient space for an object of
type 'int'". Which is a lie. There most definitely is space there.
Oh well, diagnostics are sometimes hard to get right. The UB is easy
to avoid.
PR 30279
* config/tc-m68hc11.c (md_begin): Avoid undefined pointer
decrement. Remove unnecessary cast.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/30279] New: UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, mliska at suse dot cz, 2023/03/27
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, amodra at gmail dot com, 2023/03/27
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, mliska at suse dot cz, 2023/03/27
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, mliska at suse dot cz, 2023/03/27
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, pinskia at gcc dot gnu.org, 2023/03/28
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20,
cvs-commit at gcc dot gnu.org <=
- [Bug gas/30279] UBSAN error: /buildworker/marxinbox-cross-binutils-sanitizers/build/gas/config/tc-m68hc11.c:708:20, amodra at gmail dot com, 2023/03/28