[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Badly formatted os.date format crashes
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 9 Sep 2008 09:14:10 -0300
> If this is a widespread issue (which OS are you on) then it may be
> worth investigating adding a layer of checking of the format string to
> Lua's wrapper for it.
Lua 5.2 has this layer. According to ISO C, "If a conversion specifier
is not one of the above,the behavior is undefined", and undefined
behavior includes crashing. It is a really stupid behavior, but it is
"legally correct" :( It is also a pity, because os.date will no longer
accept OS-specific extensions.