On Mon, Aug 6, 2012 at 10:41 PM, Glenn Fowler <g...@research.att.com> wrote:
>
> On Mon, 6 Aug 2012 07:28:29 +0200 Irek Szczesniak wrote:
>> On Wed, Aug 1, 2012 at 3:49 AM, Roland Mainz <roland.ma...@nrubsig.org> 
>> wrote:
>> > I'll make a proper annoucement once ksh93u+ final is out (assuming
>> > sufficient feedback has been provided (this hint is for
>> > Irek&&Lionel)).
>
>> So here is our feedback:
>> After a half a week of testing it appears the poll builtin works
>> without problems. So far we didn't found any fatal issues and those we
>> found are not fatal or exclude deployment in production environment.
>> That includes that poll is enabled by default as non-pathbound
>> builtin.
>
>> Issues we found:
>> - The builtin prints error messages as warnings
>> - The old sfpoll() code is still around but disabled. You might wanna
>> remove it now.
>> - You may wanna look at C89 compatibility. I don't see issues except
>> stdbool.h and VLA. Glenn said he'll handle stdbool for older compilers
>> but VLA needs to go, see below.
>> - IMO the use of VLA needs to be removed. The idea is intriguing, but
>> I do already envision the CERT announcement about a stack overflow bug
>> in ksh93 if some idiot clamps the stack size with ulimit and then
>> feeds an array with 1000000 elements to the poll builtin.
>
> yes -- no var length array on stack code in ast

Fixed.

Originally the point was that many |libc:poll()| implementations use
VLA or |alloca()| themselves... if the array gets too big it will
blow-up anyway in libc. On the other hand there is the issue with
CERT... sooner or later someone will test the limits and labels this
as "security bug" in ksh93 when it blows-up in our code. Grumpf... ;-(

>> Question to Glenn: Is there any platform supported by ksh93 which does
>> NOT have poll()? I've checked, a poll() emulation through select() may
>> not have access to POLLHUP (have a look at
>> http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/select.c#187).
>
> all of the architectures saved since 2005-02-02 have poll() with the proper 
> arg order
> the iffe poll tests go back before 1995
> back then it was select vs poll vs nothing + maybe link with a special lib
> at the moment I don't recall the architectures that were poll-deficient
> e.g., fd and poll array reversed

Mhhh... let's hope the current code works as expected on all platforms...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to