public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE
@ 2022-03-24 10:32 marxin at gcc dot gnu.org
  2022-03-24 10:39 ` [Bug tree-optimization/105043] " marxin at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-24 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105043
           Summary: Please document -D_FORTIFY_SOURCE
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: siddhesh at gcc dot gnu.org
  Target Milestone: ---

I would like to see documentation of the feature, as well as what each level
(1-3) enables. If it's documented in glibc, then please provide a link to the
feature.

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
@ 2022-03-24 10:39 ` marxin at gcc dot gnu.org
  2022-03-24 10:43 ` schwab@linux-m68k.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-24 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-24
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
And I would add a caveat about the usage of malloc_usable_size.

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
  2022-03-24 10:39 ` [Bug tree-optimization/105043] " marxin at gcc dot gnu.org
@ 2022-03-24 10:43 ` schwab@linux-m68k.org
  2022-03-24 11:17 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2022-03-24 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Currently the only documentation is in <features.h>.

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
  2022-03-24 10:39 ` [Bug tree-optimization/105043] " marxin at gcc dot gnu.org
  2022-03-24 10:43 ` schwab@linux-m68k.org
@ 2022-03-24 11:17 ` rguenth at gcc dot gnu.org
  2022-03-24 11:59 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-24 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
This isn't really a GCC bug since it's a glibc feature.  Please open a
bugreport on sourceware.

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-24 11:17 ` rguenth at gcc dot gnu.org
@ 2022-03-24 11:59 ` marxin at gcc dot gnu.org
  2022-03-24 20:09 ` egallager at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-24 11:59 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
https://sourceware.org/bugzilla/show_bug.cgi?id=28998

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-03-24 11:59 ` marxin at gcc dot gnu.org
@ 2022-03-24 20:09 ` egallager at gcc dot gnu.org
  2022-03-24 20:12 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-03-24 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
it's not *just* a glibc feature; Darwin Libc uses the same macro, too, for
example

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

* [Bug tree-optimization/105043] Please document -D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-03-24 20:09 ` egallager at gcc dot gnu.org
@ 2022-03-24 20:12 ` pinskia at gcc dot gnu.org
  2022-12-07  4:21 ` [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-24 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #5)
> it's not *just* a glibc feature; Darwin Libc uses the same macro, too, for
> example

Yes and Darwin (and FreeBSD, OpenBSD, NetBSD, etc.) should document it in their
libc too.

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

* [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-03-24 20:12 ` pinskia at gcc dot gnu.org
@ 2022-12-07  4:21 ` pinskia at gcc dot gnu.org
  2022-12-08 15:05 ` siddhesh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-07  4:21 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|MOVED                       |---
            Summary|Please document             |Documentation for
                   |-D_FORTIFY_SOURCE           |__builtin_object_size and
                   |                            |other Object Size checking
                   |                            |builtin functions should
                   |                            |mention - D_FORTIFY_SOURCE
           Severity|normal                      |enhancement
             Status|RESOLVED                    |NEW

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I do think we should mention in the section about __builtin_object_size that
this used in connection with the -D_FORTIFY_SOURCE feature of some libc's.

That is on this page:
https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html#Object-Size-Checking

Mention that the libc feature -D_FORTIFY_SOURCE uses these builtins.
I am not 100% sure on the exact wording but that should give a hint to the user
of GCC to look into glibc/libc documentation for -D_FORTIFY_SOURCE.

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

* [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-12-07  4:21 ` [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE pinskia at gcc dot gnu.org
@ 2022-12-08 15:05 ` siddhesh at gcc dot gnu.org
  2023-01-03 15:25 ` cvs-commit at gcc dot gnu.org
  2023-01-03 15:27 ` siddhesh at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2022-12-08 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |siddhesh at gcc dot gnu.org
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=28998

--- Comment #8 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
I'm working on some documentation in glibc.  I agree the last part of the
Object Size Checking documentation can be rephrased in the context of
_FORTIFY_SOURCE, let me take a shot at that.

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

* [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-12-08 15:05 ` siddhesh at gcc dot gnu.org
@ 2023-01-03 15:25 ` cvs-commit at gcc dot gnu.org
  2023-01-03 15:27 ` siddhesh at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-03 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:

https://gcc.gnu.org/g:b3009222b7bb26654c1e93d34e65e8f80ae20595

commit r13-4978-gb3009222b7bb26654c1e93d34e65e8f80ae20595
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date:   Thu Dec 15 14:24:55 2022 -0500

    tree-optimization/105043: Object Size Checking docs cleanup

    Break the _FORTIFY_SOURCE-specific builtins out into a separate
    subsection from Object Size Checking built-ins and mention
    _FORTIFY_SOURCE in there so that the link between the object size
    checking builtins, the helper builtins (e.g. __builtin___memcpy_chk) and
    _FORTIFY_SOURCE is clearer.

    gcc/ChangeLog:

            PR tree-optimization/105043
            * doc/extend.texi (Object Size Checking): Split out into two
            subsections and mention _FORTIFY_SOURCE.

    Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>

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

* [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE
  2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-01-03 15:25 ` cvs-commit at gcc dot gnu.org
@ 2023-01-03 15:27 ` siddhesh at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2023-01-03 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:

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

--- Comment #10 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
The glibc complement of this documentation is here:

https://patchwork.sourceware.org/project/glibc/patch/20221222160403.4151387-1-siddhesh@sourceware.org/

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

end of thread, other threads:[~2023-01-03 15:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 10:32 [Bug tree-optimization/105043] New: Please document -D_FORTIFY_SOURCE marxin at gcc dot gnu.org
2022-03-24 10:39 ` [Bug tree-optimization/105043] " marxin at gcc dot gnu.org
2022-03-24 10:43 ` schwab@linux-m68k.org
2022-03-24 11:17 ` rguenth at gcc dot gnu.org
2022-03-24 11:59 ` marxin at gcc dot gnu.org
2022-03-24 20:09 ` egallager at gcc dot gnu.org
2022-03-24 20:12 ` pinskia at gcc dot gnu.org
2022-12-07  4:21 ` [Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE pinskia at gcc dot gnu.org
2022-12-08 15:05 ` siddhesh at gcc dot gnu.org
2023-01-03 15:25 ` cvs-commit at gcc dot gnu.org
2023-01-03 15:27 ` siddhesh 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).