public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC address sanitizer - supported architecture
@ 2020-12-24  3:23 Qingnan Duan
  2020-12-24  8:48 ` Kewen.Lin
  0 siblings, 1 reply; 6+ messages in thread
From: Qingnan Duan @ 2020-12-24  3:23 UTC (permalink / raw)
  To: gcc-help

Hi everyone,
I was looking at this page Instrumentation Options (Using the GNU Compiler Collection (GCC))<https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html> and it says "-fsanitize=address" is only supported on AArch64. However, I was able to compile my code on x86-64 CPU with -fsanitize=address flag.

Is the document out-of-date? Or, does it mean the result of ASan is not guaranteed on any platform other than AArch64?
Thanks in advance for your help!

Best regards,
Qingnan Duan

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

* Re: GCC address sanitizer - supported architecture
  2020-12-24  3:23 GCC address sanitizer - supported architecture Qingnan Duan
@ 2020-12-24  8:48 ` Kewen.Lin
  2020-12-24 10:10   ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Kewen.Lin @ 2020-12-24  8:48 UTC (permalink / raw)
  To: Qingnan Duan; +Cc: gcc-help

Hi Qingnan,

on 2020/12/24 上午11:23, Qingnan Duan via Gcc-help wrote:
> Hi everyone,
> I was looking at this page Instrumentation Options (Using the GNU Compiler Collection (GCC))<https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html> and it says "-fsanitize=address" is only supported on AArch64. However, I was able to compile my code on x86-64 CPU with -fsanitize=address flag.
> 

I think the part "Note that the only target this option is currently supported on is AArch64. "
is specific for option “-fsanitize=hwaddress” not for option "-fsanitize=address".

Only aarch64 port re-defines TARGET_MEMTAG_CAN_TAG_ADDRESSES which is used for -fsanitize=hwaddress,
that matches the wordings.

By the way, I also felt a bit confused without digging, not sure whether it's confusing from
native speaker's perspective.  If yes, maybe it's worth to revise it somehow.  :)

> Is the document out-of-date? Or, does it mean the result of ASan is not guaranteed on any platform other than AArch64?
> Thanks in advance for your help!
> 
> Best regards,
> Qingnan Duan
> 

BR,
Kewen

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

* Re: GCC address sanitizer - supported architecture
  2020-12-24  8:48 ` Kewen.Lin
@ 2020-12-24 10:10   ` Jonathan Wakely
  2020-12-24 12:06     ` Kewen.Lin
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-12-24 10:10 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: Qingnan Duan, gcc-help

On Thu, 24 Dec 2020, 08:50 Kewen.Lin via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hi Qingnan,
>
> on 2020/12/24 上午11:23, Qingnan Duan via Gcc-help wrote:
> > Hi everyone,
> > I was looking at this page Instrumentation Options (Using the GNU
> Compiler Collection (GCC))<
> https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html> and it
> says "-fsanitize=address" is only supported on AArch64. However, I was able
> to compile my code on x86-64 CPU with -fsanitize=address flag.
> >
>
> I think the part "Note that the only target this option is currently
> supported on is AArch64. "
> is specific for option “-fsanitize=hwaddress” not for option
> "-fsanitize=address".
>
> Only aarch64 port re-defines TARGET_MEMTAG_CAN_TAG_ADDRESSES which is used
> for -fsanitize=hwaddress,
> that matches the wordings.
>
> By the way, I also felt a bit confused without digging, not sure whether
> it's confusing from
> native speaker's perspective.  If yes, maybe it's worth to revise it
> somehow.  :)
>

Yes, the documentation should be fixed. As currently written it's incorrect.

Could you please file a bug?

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

* Re: GCC address sanitizer - supported architecture
  2020-12-24 10:10   ` Jonathan Wakely
@ 2020-12-24 12:06     ` Kewen.Lin
  2020-12-24 12:28       ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Kewen.Lin @ 2020-12-24 12:06 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Qingnan Duan, gcc-help

> on 2020/12/24 下午6:10, Jonathan Wakely wrote:
> On Thu, 24 Dec 2020, 08:50 Kewen.Lin via Gcc-help, <gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org>> wrote:
> 
>     Hi Qingnan,
> 
>     on 2020/12/24 上午11:23, Qingnan Duan via Gcc-help wrote:
>     > Hi everyone,
>     > I was looking at this page Instrumentation Options (Using the GNU Compiler Collection (GCC))<https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html <https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html>> and it says "-fsanitize=address" is only supported on AArch64. However, I was able to compile my code on x86-64 CPU with -fsanitize=address flag.
>     >
> 
>     I think the part "Note that the only target this option is currently supported on is AArch64. "
>     is specific for option “-fsanitize=hwaddress” not for option "-fsanitize=address".
> 
>     Only aarch64 port re-defines TARGET_MEMTAG_CAN_TAG_ADDRESSES which is used for -fsanitize=hwaddress,
>     that matches the wordings.
> 
>     By the way, I also felt a bit confused without digging, not sure whether it's confusing from
>     native speaker's perspective.  If yes, maybe it's worth to revise it somehow.  :)
> 
> 
> Yes, the documentation should be fixed. As currently written it's incorrect.
> 
> Could you please file a bug?
> 

Hi Jonathan,

Thanks for confirming this.  PR98437 was opened as you suggested.


BR,
Kewen

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

* Re: GCC address sanitizer - supported architecture
  2020-12-24 12:06     ` Kewen.Lin
@ 2020-12-24 12:28       ` Jonathan Wakely
  2020-12-25  7:37         ` [EXTERNAL] " Qingnan Duan
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-12-24 12:28 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: Qingnan Duan, gcc-help

On Thu, 24 Dec 2020, 12:06 Kewen.Lin, <linkw@linux.ibm.com> wrote:

> > on 2020/12/24 下午6:10, Jonathan Wakely wrote:
> > On Thu, 24 Dec 2020, 08:50 Kewen.Lin via Gcc-help, <gcc-help@gcc.gnu.org
> <mailto:gcc-help@gcc.gnu.org>> wrote:
> >
> >     Hi Qingnan,
> >
> >     on 2020/12/24 上午11:23, Qingnan Duan via Gcc-help wrote:
> >     > Hi everyone,
> >     > I was looking at this page Instrumentation Options (Using the GNU
> Compiler Collection (GCC))<
> https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html <
> https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html>> and it
> says "-fsanitize=address" is only supported on AArch64. However, I was able
> to compile my code on x86-64 CPU with -fsanitize=address flag.
> >     >
> >
> >     I think the part "Note that the only target this option is currently
> supported on is AArch64. "
> >     is specific for option “-fsanitize=hwaddress” not for option
> "-fsanitize=address".
> >
> >     Only aarch64 port re-defines TARGET_MEMTAG_CAN_TAG_ADDRESSES which
> is used for -fsanitize=hwaddress,
> >     that matches the wordings.
> >
> >     By the way, I also felt a bit confused without digging, not sure
> whether it's confusing from
> >     native speaker's perspective.  If yes, maybe it's worth to revise it
> somehow.  :)
> >
> >
> > Yes, the documentation should be fixed. As currently written it's
> incorrect.
> >
> > Could you please file a bug?
> >
>
> Hi Jonathan,
>
> Thanks for confirming this.  PR98437 was opened as you suggested.
>

Great, thanks.



>
>
>

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

* Re: [EXTERNAL] Re: GCC address sanitizer - supported architecture
  2020-12-24 12:28       ` Jonathan Wakely
@ 2020-12-25  7:37         ` Qingnan Duan
  0 siblings, 0 replies; 6+ messages in thread
From: Qingnan Duan @ 2020-12-25  7:37 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: gcc-help, Jonathan Wakely

Hi Kewen,
Thank you for the explanation.

Best regards,
Qingnan Duan
________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Thursday, December 24, 2020 20:28
To: Kewen.Lin <linkw@linux.ibm.com>
Cc: Qingnan Duan <Qingnan.Duan@microsoft.com>; gcc-help <gcc-help@gcc.gnu.org>
Subject: [EXTERNAL] Re: GCC address sanitizer - supported architecture



On Thu, 24 Dec 2020, 12:06 Kewen.Lin, <linkw@linux.ibm.com<mailto:linkw@linux.ibm.com>> wrote:
> on 2020/12/24 下午6:10, Jonathan Wakely wrote:
> On Thu, 24 Dec 2020, 08:50 Kewen.Lin via Gcc-help, <gcc-help@gcc.gnu.org<mailto:gcc-help@gcc.gnu.org> <mailto:gcc-help@gcc.gnu.org<mailto:gcc-help@gcc.gnu.org>>> wrote:
>
>     Hi Qingnan,
>
>     on 2020/12/24 上午11:23, Qingnan Duan via Gcc-help wrote:
>     > Hi everyone,
>     > I was looking at this page Instrumentation Options (Using the GNU Compiler Collection (GCC))<https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fonlinedocs%2Fgcc%2FInstrumentation-Options.html&data=04%7C01%7Cqingnan.duan%40microsoft.com%7Cc5804cae19b542e4257c08d8a8076db7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637444097175916947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IQqepPCIqaScR58IOrTVCNQMbOYAkuhRaAL5L71MBCA%3D&reserved=0> <https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fonlinedocs%2Fgcc%2FInstrumentation-Options.html&data=04%7C01%7Cqingnan.duan%40microsoft.com%7Cc5804cae19b542e4257c08d8a8076db7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637444097175916947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IQqepPCIqaScR58IOrTVCNQMbOYAkuhRaAL5L71MBCA%3D&reserved=0>>> and it says "-fsanitize=address" is only supported on AArch64. However, I was able to compile my code on x86-64 CPU with -fsanitize=address flag.
>     >
>
>     I think the part "Note that the only target this option is currently supported on is AArch64. "
>     is specific for option “-fsanitize=hwaddress” not for option "-fsanitize=address".
>
>     Only aarch64 port re-defines TARGET_MEMTAG_CAN_TAG_ADDRESSES which is used for -fsanitize=hwaddress,
>     that matches the wordings.
>
>     By the way, I also felt a bit confused without digging, not sure whether it's confusing from
>     native speaker's perspective.  If yes, maybe it's worth to revise it somehow.  :)
>
>
> Yes, the documentation should be fixed. As currently written it's incorrect.
>
> Could you please file a bug?
>

Hi Jonathan,

Thanks for confirming this.  PR98437 was opened as you suggested.

Great, thanks.






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

end of thread, other threads:[~2020-12-25  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24  3:23 GCC address sanitizer - supported architecture Qingnan Duan
2020-12-24  8:48 ` Kewen.Lin
2020-12-24 10:10   ` Jonathan Wakely
2020-12-24 12:06     ` Kewen.Lin
2020-12-24 12:28       ` Jonathan Wakely
2020-12-25  7:37         ` [EXTERNAL] " Qingnan Duan

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).