This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/6] Optimize i386 syscall inlining


On Fri, Aug 21, 2015 at 11:00 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> No, I think this patch is going further with a defective interface and the
> correct approach is to fix the interface before building further on top of
> it.  That is, remove the third argument to INLINE_SYSCALL_ERROR_RETURN,
> changing the specification of the macro to be that it always evaluates to
> or returns ((type) -1).

I was just going to post the same thing.  If there are circumstances
where a syscall needs to return something other than -1 on error (I
can't think of any off the top of my head, but I don't have the entire
system call list memorized), there is probably a damn good reason for
it.  A generic macro that *might or might not* honor the return-value
argument, depending on the architecture, is a cross-architecture
compatibility bug waiting to happen.  Possibly an *unfixable*
cross-arch compat bug, if binaries come to depend on the incorrect
behavior.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]