Sami Vaarala
0149d7fc9c
Force unpacked duk_tval on x64 regardless of platform
This should fix Visual Studio 2010 + x64 also.
11 years ago
Sami Vaarala
728e5c644f
Portability note for VS2010/X64
11 years ago
Sami Vaarala
1c4869b163
Treat negative lexer input_offset as an internal error
Before the change a negative input offset would lead to memory unsafe
behavior. This is correct as such because a negative input offset
should never happen (so an assert is sufficient). However, the compiler
saves and restores lexer "points" to and from duk_tval numbers, so if
duk_tval representation is chosen improperly or something similar happens,
the input offset could be corrupted (again, this is only the case if
something is pretty badly wrong anyway).
The new behavior is to throw an internal error for negative input offsets.
This is explicit and memory safe, and protects against potential compiler
bugs too.
11 years ago
Sami Vaarala
b01c93404e
Fix a potential 64-bit pointer arithmetic issue
11 years ago
Sami Vaarala
5674f403b5
Release note update
11 years ago
Sami Vaarala
33f33ac678
Improve packed_tval feature detection and fix a few constants
DUK_UINTPTR_MAX, DUK_UINTMAX_MAX, and related signed variants had incorrect
values for the case where standard C99 int types were not available, platform
was 64-bit (this probably happened in GH-15). This would lead duk_features.h
to incorrectly deduce that a packed duk_tval was possible.
Combined with the related duk_tval vs. sizeof(void *) self test, this case
should now be much better covered.
11 years ago
Sami Vaarala
93c6e12c7a
Add a selftest for detecting incorrect packed duk_tval guess
Without this selftest, an incorrect guess leads to crashes (see e.g.
GH-15).
11 years ago
Sami Vaarala
05d1284161
Merge branch 'x64-vs2010-intconst-fix'
11 years ago
Sami Vaarala
32f44e803c
Release note update
11 years ago
Sami Vaarala
91d69ca87a
Describe the signed integer minimum constant issue in internal doc
Related to GH-15.
11 years ago
Sami Vaarala
cabae029cd
Portability fix for signed int minimum constants (e.g. -0x80000000L -> -0x7fffffffL - 1L)
Signed integer constants like -0x80000000L are not portable. The reason is
somewhat hairy, see code-issues.txt for a detailed discussion. This fix
changes such constants to computed values (like -0x7fffffffL - 1L) to avoid
portability issues related to signed/unsigned integers.
This fixes a concrete bug on VS2010 + X64 (GH-15).
11 years ago
Sami Vaarala
cbca7b5f55
A note on minimum signed integer constant corner case
11 years ago
Sami Vaarala
7bbdebe16a
A few explicit casts for double vs. int comparisons
11 years ago
Sami Vaarala
6d10f38d9b
Merge branch 'fix-dist-zip'
11 years ago
Sami Vaarala
01ac82e29a
Add dist-src zip variant with git describe
11 years ago
Sami Vaarala
86159943dc
Ditz issue update
11 years ago
Sami Vaarala
dc4f21400a
Merge branch 'api-sprintf-improvements'
11 years ago
Sami Vaarala
f2774bed99
Release note update
11 years ago
Sami Vaarala
928341ce7e
Make duk_log() support artbirarily long log messages
Internally, use duk_push_vsprintf() for log message formatting, which now
has support for formatting 99% of messages with a stack buffer.
11 years ago
Sami Vaarala
221a5cc115
Add a ~1kB C API log message testcase
This case used to fail because C code used a placeholder, fixed size stack
buffer. This has now been fixed.
11 years ago
Sami Vaarala
8cc79e3d6e
Add stack top to duk_push_sprintf() API test
11 years ago
Sami Vaarala
c60adc128e
Rework duk_push_vsprintf() loop to reduce code size
11 years ago
Sami Vaarala
2a2cf53ccf
Use stack buffer when possible in duk_push_vsprintf()
11 years ago
Sami Vaarala
b776f5d3ff
Merge branch 'heaphdr-tag-trivia'
11 years ago
Sami Vaarala
0360cd7d60
Comment fix
11 years ago
Sami Vaarala
3eb637ba22
Ditz issue update
11 years ago
Sami Vaarala
1e9411808e
Ditz issue update
11 years ago
Sami Vaarala
f260cee04d
Merge branch 'buffer-helper-sharing'
11 years ago
Sami Vaarala
ba228aa06b
release note update
11 years ago
Sami Vaarala
4b40af4dad
API doc update for duk_to_buffer() and duk_to_{fixed,dynamic}_buffer()
11 years ago
Sami Vaarala
becbdbf945
Update duk_to_fixed_buffer() testcase to include duk_to_dynamic_buffer()
11 years ago
Sami Vaarala
4554791b29
Fix test-to-fixed-buffer.c API test case
11 years ago
Sami Vaarala
c297836385
Change arguments/return of duk_to_{fixed,dynamic}_buffer()
This makes them more consistent with duk_to_buffer() behavior.
11 years ago
Sami Vaarala
3682afa81d
Comment fix
11 years ago
Sami Vaarala
5837184431
Bug fix to duk_to_buffer_raw()
11 years ago
Sami Vaarala
ff11c49619
Refactor duk_to_buffer() so that it can be more easily shared
11 years ago
Sami Vaarala
60988b69db
Merge branch 'memcpy-zero-checks'
11 years ago
Sami Vaarala
8b99a927f8
Assert typo fix
11 years ago
Sami Vaarala
7b1aec3443
Further header note on zero-size memcpy/friends
11 years ago
Sami Vaarala
31ea15e4cf
Minor changes to zero-size memcpy/memmove sites
11 years ago
Sami Vaarala
db1e3e7e24
Note on memcpy & co zero-size vs. pointer validity semantics
11 years ago
Sami Vaarala
9aef86dd2f
Merge branch 'proxy-rev24-update'
11 years ago
Sami Vaarala
1253cda819
Update website ES6 refs to Rev 24
11 years ago
Sami Vaarala
7204c8e42d
Ditz issue update
11 years ago
Sami Vaarala
7ac1c0f11a
Ditz issue update
11 years ago
Sami Vaarala
63d821f847
Merge branch 'makefile-fix'
11 years ago
Sami Vaarala
3850ed0acf
Fix Makefile dist target which always got built
11 years ago
Sami Vaarala
37f9ab4f06
Merge branch 'testcase-totp'
11 years ago
Sami Vaarala
5fb1705689
Add a TOTP testcase, exercises bit arithmetic
11 years ago
Sami Vaarala
927efaefde
Ditz issue update
11 years ago