Releases: allenluce/mmap-object
Fix, security updates
Node v12 and other fixes
This updates packages (to avoid npm audit
security warnings), fixes v8
library deprecation messages, and does a tiny bit of code refactoring.
Big impacts: NodeJS version 12 is now supported.
Slightly less big: NodeJS versions 4 and 5 are no longer supported.
Internal protection and small fixes
An internal versioning facility is added to help in detecting file compatibility mismatches in the future. Several small fixes and dev-facing changes have been made.
File compatibility release
The 1.3.9 release creates files that are incompatible with previous releases. It would also crash when trying to open files made by earlier releases. Turns out that it isn't necessary to change the file format. It also turns out there weren't mechanisms to advise users that files wouldn't be compatible.
This version maintains compatibility with prior releases. The files it writes should be readable by all previous versions of the module.
Performance enhancements
A lot of time was being spent checking if an accessed property was a method. Replacing the set<string>
lookup with Aho Corasick halved the latency of the critical path.
Moving the part that checks for the inspect method into the isMethod()
clause added a little bit of speedup as well.
Bugfix release
A subtle bug in the async close routine could cause a hard crash (segmentation fault). Incidence of this bug was extremely rare, GC has to run at the right time during the close.
NAN update and Node version 9
Compiling with Node 9.6.0 gives this message:
../mmap-object.cc:552:17: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../node_modules/nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../node_modules/nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
This was fixed by upgrading NAN. I also took the opportunity to tune the Travis config to use Clang for OSX. This might affect the pre-built binaries so I'm putting out this new release.
Node version 8 added to supported list
This release adds a binary targeted to Node v8. Packages are updated.
Handle empty and corrupt files
Open calls were hanging when opening a zero-length file. This turns those into exceptions. A couple of corrupt file cases are also handled.
Read-write (somewhat) working on macOS
As explained on StackOverflow, storing mutexes in shared memory on macOS is problematic as it depends on address values cross-process. One way to address this is to store things at a known address.
I've picked an address in the middle of the process space (as I've seen it on my 10.10.5 machine). Each file requires its own base address so if you're opening more than one concurrently on a single box, make sure each unique filename has the same base-address.
These changes do not affect Linux.
This release also includes the async close()
from from the mainline.