public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris
       [not found] <bug-90337-4@http.gcc.gnu.org/bugzilla/>
@ 2020-09-22 13:42 ` msl0000023508 at gmail dot com
  2020-09-22 13:44 ` msl0000023508 at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: msl0000023508 at gmail dot com @ 2020-09-22 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

WHR <msl0000023508 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msl0000023508 at gmail dot com

--- Comment #8 from WHR <msl0000023508 at gmail dot com> ---
I found this sanitizer-related issue when building GCC 10.2 for Solaris; and
after manual source browseing I believe this bug still existing in the master
branch.

To fix the O_DIRECTORY issue, my opinion is to remove its use by using '#if
SANITIZER_LINUX', because the only place it gets used is some Linux-specific
code, that uses Linux procfs path '/proc/%d/task/'.

I also found some other issues.

Solaris libelf.h doesn't work with _FILE_OFFSET_BITS=64 for i386 target, 
/usr/include/libelf.h:42:2: error: #error "large files are not supported by
libelf"

Last issue is the code uses madvise(2), which is non-standard, and therefore
didn't get declared by Solaris system headers without some addition macros; the
standard interface posix_madvise(3) should be used instead.

I will upload my patches shortly.

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

* [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris
       [not found] <bug-90337-4@http.gcc.gnu.org/bugzilla/>
  2020-09-22 13:42 ` [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris msl0000023508 at gmail dot com
@ 2020-09-22 13:44 ` msl0000023508 at gmail dot com
  2020-09-22 13:45 ` msl0000023508 at gmail dot com
  2020-09-22 13:46 ` msl0000023508 at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: msl0000023508 at gmail dot com @ 2020-09-22 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from WHR <msl0000023508 at gmail dot com> ---
Created attachment 49257
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49257&action=edit
gcc-10.2.0-sanitizer-linux-procfs-fix.diff

Limit this Linux procfs code to Linux only.

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

* [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris
       [not found] <bug-90337-4@http.gcc.gnu.org/bugzilla/>
  2020-09-22 13:42 ` [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris msl0000023508 at gmail dot com
  2020-09-22 13:44 ` msl0000023508 at gmail dot com
@ 2020-09-22 13:45 ` msl0000023508 at gmail dot com
  2020-09-22 13:46 ` msl0000023508 at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: msl0000023508 at gmail dot com @ 2020-09-22 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from WHR <msl0000023508 at gmail dot com> ---
Created attachment 49258
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49258&action=edit
gcc-10.2.0-sanitizer-solaris-libelf-h-without-file-offset-bits-64.diff

Solaris libelf.h doesn't work with _FILE_OFFSET_BITS=64 for i386 target.

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

* [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris
       [not found] <bug-90337-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-09-22 13:45 ` msl0000023508 at gmail dot com
@ 2020-09-22 13:46 ` msl0000023508 at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: msl0000023508 at gmail dot com @ 2020-09-22 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from WHR <msl0000023508 at gmail dot com> ---
Created attachment 49259
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49259&action=edit
gcc-10.2.0-sanitizer-madvise-fix.diff

Replace non-standard madvise(2) with posix_madvise(3).

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

end of thread, other threads:[~2020-09-22 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-90337-4@http.gcc.gnu.org/bugzilla/>
2020-09-22 13:42 ` [Bug sanitizer/90337] sanitizer_linux.cc Fails to compile on Illumos-derived Solaris msl0000023508 at gmail dot com
2020-09-22 13:44 ` msl0000023508 at gmail dot com
2020-09-22 13:45 ` msl0000023508 at gmail dot com
2020-09-22 13:46 ` msl0000023508 at gmail dot com

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