Groups
Groups
Sign in
Groups
Groups
szl-users
Conversations
About
Send feedback
Help
Integer overflow in Sawzall
15 views
Skip to first unread message
Adrian Colley
unread,
Jun 17, 2014, 7:30:14 PM
6/17/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to szl-...@googlegroups.com
What's the correct behavior on integer overflow in a Sawzall program?
The "Sawzall Language" document (
http://szl.googlecode.com/svn/doc/sawzall-language.html
) ranks it with division-by-zero and bad array indices, strongly implying that it should result in an undefined value.
The language specification (
http://szl.googlecode.com/svn/doc/sawzall-spec.html
) is completely silent on the matter, as is the original paper (
http://research.google.com/archive/sawzall.html
).
Almost convincingly, one of the unit tests expects a particular kind of integer wraparound (
https://code.google.com/p/szl/source/browse/trunk/src/engine/language_tests/base/arith.szl
), and definitely not undefined-replacement. And yes, the test passes (unless you use g++ 4.9's -fsanitize=undefined flag).
So, what's with the clear disconnect between spec and code? Which one has the bug?
--Adrian.
parser of karma-separated values
Reply all
Reply to author
Forward
0 new messages