[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (beta) now available
- From: Sean Conner <sean@...>
- Date: Sun, 26 Oct 2014 17:24:23 -0400
It was thus said that the Great Roberto Ierusalimschy once stated:
>
> > Finally there is an alignment/padding feature in this new pack/unpack
> > code. But the padding value used when packing is not specified. Being
> > able to configure the value would be a bit too much, but I think you
> > should at least define the value you use (if it's currently undefined)
> > and document it.
>
> It is 0. We will document that.
Any chance for a way to change it? I often use 0xCC [1] on Intel
platforms to initialize "un-initialized" memory when debugging.
-spc (A 0 value is just too predictable 8-P
[1] 0xCC on Intel because that's INT 3, the breakpoint instruction. If
it's executed, it causes a breakpoint (which either core dumps if
you aren't running under a debugger, or at the debugger's prompt if
you are). A run of 0xCC as UTF-8 creates an invalid character (and
if you are only expecting ASCII, a sure sign of a problem). As a
signed integer, it's a fairly large negative number, and as an
unsigned number, it's a large positive number. And as an
address---well, it's most likely a bogus address.
The value to use on other platforms varies---on the Motorola 68K
series, it's 0xA1 (unimplemented opcodes if executed, breaks UTF-8
sequences, unusual integer values, etc).