public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100358] New: Not all filesystems support posix_fallocate() (e.g. ZFS)
@ 2021-04-30 13:18 andy at omnios dot org
  2021-04-30 13:58 ` [Bug c++/100358] " andy at omnios dot org
  0 siblings, 1 reply; 2+ messages in thread
From: andy at omnios dot org @ 2021-04-30 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100358
           Summary: Not all filesystems support posix_fallocate() (e.g.
                    ZFS)
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andy at omnios dot org
  Target Milestone: ---

I've been troubleshooting a raft of testsuite failures with gcc 11.1 on OmniOS
(an illumos distribution, using Target: x86_64-pc-solaris2.11).

For example:

dir-only-3.C:10:2: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.

> $G
C++ symbol demangling enabled
> $C
fffffc7fffdf2b90 libc.so.1`memcpy+0x554()
fffffc7fffdf2bd0 elf_out::end+0x102()
fffffc7fffdf2ca0 finish_module_processing+0x4cf()
fffffc7fffdf2d70 c_parse_final_cleanups+0x78c()
fffffc7fffdf2d90 compile_file+0x24()
fffffc7fffdf2e50 toplev::main+0x7e9()
fffffc7fffdf2e80 main+0x31()
fffffc7fffdf2eb0 _start_crt+0x87()
fffffc7fffdf2ec0 _start+0x18()


This turns out to be due to the use of posix_fallocate() in gcc/cp/module.cc -
elf_out::create_mapping()

Although illumos supports the posix_fallocate() function, I am running gcc to
compile files on a ZFS filesystem, and that filesystem does not support this.
Swapping back to ftruncate() resolves the problem, and I suggest that if
posix_fallocate() fails with EINVAL, the code should then try ftruncate().

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

* [Bug c++/100358] Not all filesystems support posix_fallocate() (e.g. ZFS)
  2021-04-30 13:18 [Bug c++/100358] New: Not all filesystems support posix_fallocate() (e.g. ZFS) andy at omnios dot org
@ 2021-04-30 13:58 ` andy at omnios dot org
  0 siblings, 0 replies; 2+ messages in thread
From: andy at omnios dot org @ 2021-04-30 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from andy at omnios dot org ---
From
https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html

    [EINVAL]
    The len argument is less than zero, or the offset argument is less than
    zero, or the underlying file system does not support this operation.

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

end of thread, other threads:[~2021-04-30 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 13:18 [Bug c++/100358] New: Not all filesystems support posix_fallocate() (e.g. ZFS) andy at omnios dot org
2021-04-30 13:58 ` [Bug c++/100358] " andy at omnios dot 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).