In the _reserve() function, an assertion compared pointers which it assumed
both pointed within the heap, or in fact within the same buffer. However, if
one pointer pointed into the stack, then the assertion would incorrectly fail
if the stack were located below the heap in address space. That never happens
in a normal Linux process, but _can_ happen in a thread, since thread stacks
may be allocated on the heap.
Solution was to re-order the steps in which _reserve() overwrites the buffer,
making the assertion irrelevant.
In STRUCT() and ARRAY() declarations, change the optional "validator"
arg from taking a bare function name to enclose the function name in
VALIDATOR(function)
The OpenJDK 7 recently introduced the UNUSED() macro in their jni_md.h
header file, which is included from <jni.h>. This causes a
compile-error if "constants.h", which defines our own UNUSED() macro, is
included as well as <jni.h>.
The OpenJDK UNUSED() macro is unsuitable for our own use, because it
prefixes the unused identifier with "UNUSED_" whereas we depend on the
parameter name remaining unchanged.
I have reported this as a Request for Enhancement with Oracle Java,
asking them to remove the UNUSED() macro, since it is not used by any
JNI or Java extension header files. Review ID: JI-9013689.
In the meantime, constants.h now undefines UNUSED before defining it, so
including <jni.h> before "constants.h" will avoid a compile error.
Change manifest Content-Type from rhizome-manifest/text to
rhizome/manifest; format="text+binarysig"
Add "Content-Transfer-Encoding" form-part headers to Java API
sent form parts, although not currently checked by Rhizome
RESTful interface
Add RHIZOME_BUNDLE_STATUS_READONLY enum value
Tighten up switch statements on bundle and payload status enums (no
default labels)
Rename some recently added enum entries
Return bundle status and payload status in HTTP responses
Add test for failing to decrypt a foreign encrypted bundle payload,
fix bug that caused an assertion failure
Add tests for fetching a non-existent manifest and fetching bundles
whose payload blob is not in the store