public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
@ 2015-03-01 11:44 trippels at gcc dot gnu.org
  2015-03-01 12:12 ` [Bug target/65261] " trippels at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-01 11:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

            Bug ID: 65261
           Summary: [5 Regression] bootstrap-ubsan ppc64le:
                    gcc/libcpp/lex.c:552:30: runtime error: load of
                    misaligned address 0x01002172dfc6 for type 'const
                    uchar', which requires 16 byte alignment
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: wschmidt at gcc dot gnu.org
            Blocks: 63426
              Host: powerpc64le-unknown-linux-gnu
            Target: powerpc64le-unknown-linux-gnu
             Build: powerpc64le-unknown-linux-gnu

Starting with r215873 I get many "load of misaligned address" runtime errors
in lex.c:552:30 during --with-build-config=bootstrap-ubsan:

../../gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address
0x01001f31d37a for type 'const uchar', which requires 16 byte alignment
0x01001f31d37a: note: pointer points here
 6e 63  2e 0a 20 20 20 54 68 69  73 20 66 69 6c 65 20 69  73 20 70 61 72 74 20
6f  66 20 74 68 65 20
              ^


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/65261] [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
  2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
@ 2015-03-01 12:12 ` trippels at gcc dot gnu.org
  2015-03-02  9:02 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-01 12:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Maybe just adding __attribute__ ((no_sanitize_undefined)) to the function
is the right solution it this case?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/65261] [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
  2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
  2015-03-01 12:12 ` [Bug target/65261] " trippels at gcc dot gnu.org
@ 2015-03-02  9:02 ` rguenth at gcc dot gnu.org
  2015-03-02 16:37 ` wschmidt at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-02  9:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/65261] [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
  2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
  2015-03-01 12:12 ` [Bug target/65261] " trippels at gcc dot gnu.org
  2015-03-02  9:02 ` rguenth at gcc dot gnu.org
@ 2015-03-02 16:37 ` wschmidt at gcc dot gnu.org
  2015-03-04 17:29 ` trippels at gcc dot gnu.org
  2015-03-04 17:33 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2015-03-02 16:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

--- Comment #2 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Markus, yes, if adding that attribute clears up the messages for you, then I
would agree with that solution.  The code is working as designed, as use of
unaligned vector loads and stores on POWER8 is preferable to the
forced-alignment solution.  Could you please verify and submit a patch?

Thanks,
Bill


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/65261] [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
  2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-02 16:37 ` wschmidt at gcc dot gnu.org
@ 2015-03-04 17:29 ` trippels at gcc dot gnu.org
  2015-03-04 17:33 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-04 17:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Author: trippels
Date: Wed Mar  4 17:28:56 2015
New Revision: 221190

URL: https://gcc.gnu.org/viewcvs?rev=221190&root=gcc&view=rev
Log:
Fix PR65261

Running bootstrap-ubsan on ppc64le shows many instances of:

  libcpp/lex.c:552:30: runtime error: load of misaligned address
  0x01001f31d37a for type 'const uchar', which requires 16 byte alignment

But the unaligned vector loads are intended in this case, because they
are preferable to forced-alignment on POWER8. So just silence the ubsan
errors.

2015-03-02  Markus Trippelsdorf  <markus@trippelsdorf.de>

include/
    PR target/65261
    * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.

libcpp/
    PR target/65261
    * lex.c (search_line_fast): Silence ubsan errors.

Modified:
    trunk/include/ChangeLog
    trunk/include/ansidecl.h
    trunk/libcpp/ChangeLog
    trunk/libcpp/lex.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/65261] [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment
  2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-04 17:29 ` trippels at gcc dot gnu.org
@ 2015-03-04 17:33 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-04 17:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65261

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
fixed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-04 17:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-01 11:44 [Bug target/65261] New: [5 Regression] bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment trippels at gcc dot gnu.org
2015-03-01 12:12 ` [Bug target/65261] " trippels at gcc dot gnu.org
2015-03-02  9:02 ` rguenth at gcc dot gnu.org
2015-03-02 16:37 ` wschmidt at gcc dot gnu.org
2015-03-04 17:29 ` trippels at gcc dot gnu.org
2015-03-04 17:33 ` trippels 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).