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

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to Jakub Jelinek from comment #2)
> I don't have a -mx32 capable environment, so can't verify, but mmap/munmap
> shouldn't be inlined in any way, so can you reproduce if you replace
> mmap with foo and munmap with bar and define them like:
> static char c;
> __attribute__((noipa)) void *
> foo (void *addr, size_t length, int prot, int flags, int fd, off_t offset)
> {
>   return (void *) &c;
> }
> __attribute__((noipa)) int
> bar (void *addr, size_t length)
> {
>   if (addr != (void *) &c)
>     return -1;
>   return 0;
> }
> or so?  If yes, can you also drop errno from the testcase, and possibly drop
> unnecessary arguments to foo and/or bar as long as it reproduces?  Once
> minimized that way, please preprocess it.

Can't reduce it down so there is no munmap().  I suspect this is because going
across the syscall layer means there's some naked asm involved to call the real
munmap().

Reply via email to