os.date crashes wlua

Bug #418078 reported by Stuart P. Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sandpad
Won't Fix
Medium
Unassigned

Bug Description

If you call os.date with a non-ANSI-C-valid format string (eg. not "D" but "%D"), Lua Windows Standalone Interpreter will encounter a problem and need to close.

Revision history for this message
Stuart P. Bentley (stuart) wrote :

This is an error in Lua caused by an error in Windows (crashing if undefined strings get sent to its functions). Lua 5.2 is slated to "fix" this by having all parameters not defined in ANSI C cause a Lua error.

description: updated
Changed in sandpad:
status: New → Won't Fix
Revision history for this message
Stuart P. Bentley (stuart) wrote :

If this really ruins anybody's day, I've created a branch at lp:~stuart/sandpad/wrapunsafe with a "valid.lua" containing a table of all the valid C-defined parameters strftime as a starting point for writing a wrapper around os.date (and io.open, which also has this problem).

tags: added: os-specific
Changed in sandpad:
importance: Undecided → Medium
tags: added: dont-do-that
tags: added: inescapable-fact-of-lua
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.