Permalink
Commits on Jun 18, 2012
  1. Merge pull request #25 from basho/jdm-make-permanent

    Lock spidermonkey_drv.so in memory so NSPR thread cleanup code runs.
    jonmeredith committed Jun 18, 2012
Commits on Jun 15, 2012
Commits on Jun 13, 2012
  1. Merge pull request #24 from basho/jem-fix-bsd-compile

    Fix FreeBSD package compilation
    Jared Morrow committed Jun 13, 2012
  2. Fix pre-R15 compatibility

    jtuple committed Jun 13, 2012
  3. Add some more cleanup and the ability to see what targets are being c…

    …alled
    Jared Morrow committed Jun 13, 2012
  4. Point to specific c_src/Makefile target to fix BSD make build

    When doing a `make package` from toplevel riak, BSD's make was pulling in random characters
    as targets when the specific make target was not specified. I can't find any reason or
    documentation on why this would happen, but adding the `js` target fixed things.
    Jared Morrow committed Jun 13, 2012
Commits on Jun 12, 2012
  1. Merge pull request #19 from msantos/crash-on-oom

    Crash on oom
    Jared Morrow committed Jun 12, 2012
Commits on May 31, 2012
  1. Avoid zeroing buf before copy

    msantos committed May 31, 2012
  2. Correct arg passed to JS_DefineFunction

    Suppress compiler warning:
    
    c_src/spidermonkey.c: In function ‘sm_initialize’:
    c_src/spidermonkey.c:165:21: warning: passing argument 4 of
    ‘JS_DefineFunction’ from incompatible pointer type [enabled by default]
    c_src/system/include/js/jsapi.h:1905:1: note: expected ‘JSNative’ but
    argument is of type ‘JSBool (**)(struct JSContext *, struct JSObject *,
            uintN,  jsval *, jsval *)’
    msantos committed May 31, 2012
  3. Check for OOM conditions

    According to the man page for erl_driver, driver_alloc is a wrapper
    around malloc():
    
        This function allocates a memory block of the size specified in size,
        and returns it. This only fails on out of memory, in that case NULL
        is returned. (This  is  most often a wrapper for malloc).
    
    Test for OOM and crash the VM to prevent buffer overflows.
    
    Avoid zeroing buffers that will have their contents overwritten.
    msantos committed May 31, 2012
  4. Remove useless cast from void

    Since driver_alloc() returns void, the cast is not required.
    
    Simplify the buffer size calculation as sizeof(char) is defined to be 1.
    msantos committed May 27, 2012
Commits on May 17, 2012
  1. Include <stdint.h> for intptr_t type

    Jared Morrow committed May 17, 2012
  2. Merge pull request #20 from basho/jem-15b-driver-changes

    Change erlang_js driver to be compatible with R15 conventions
    Jared Morrow committed May 17, 2012
  3. Use -Wall to enforce tighter standards

    Jared Morrow committed May 17, 2012
  4. Change driver_* calls to be compatible with new types in Erlang OTP R15

    The erlang driver interface changed to properly support 64-bit
    architectures. The bug OTP-9795 in the [R15B release notes](http://www.erlang.org/download/otp_src_R15B.readme)
    describes the issue. The instructions on how to rewrite drivers
    was found [in the erlang manual](http://www.erlang.org/doc/man/erl_driver.html#rewrites_for_64_bits).
    Jared Morrow committed May 17, 2012
Commits on May 16, 2012
  1. Turn on strict prototype checking and fix function prototypes

    In C f() and f(void) are two different things.  If the function truly
    takes no arguments, f(void) is the proper definition.
    Jared Morrow committed May 16, 2012
Commits on Apr 13, 2012
  1. Roll version 1.0.2

    Jared Morrow committed Apr 13, 2012
Commits on Mar 27, 2012
  1. Merge pull request #18 from basho/dss-fix-xcode43

    Remove inline declarations; Xcode 4.3 does some strange stuff when inlin...
    dizzyd committed Mar 27, 2012
Commits on Mar 20, 2012
Commits on Feb 19, 2012
  1. Roll version 1.0.1

    Jared Morrow committed Feb 19, 2012
Commits on Dec 29, 2011
  1. Merge pull request #15 from basho/bz1283-thread-safety

    BUG 1283: erlang_js uses non-thread-safe driver function
    Scott Lystig Fritchie committed Dec 29, 2011
Commits on Dec 16, 2011
Commits on Dec 14, 2011
  1. Change improper use of ERL_DRV_EXTENDED_MAJOR_VERSION to the correct …

    …ERL_DRV_EXTENDED_MINOR_VERSION.
    kellymclaughlin committed Dec 14, 2011
Commits on Nov 13, 2011
  1. BUG 1283: erlang_js uses non-thread-safe driver function

    Using `driver_output_term()` in an async worker pool thread
    is a big no-no.  A solution is to use `driver_output_term()`
    in the `ready_async()` function, which executes in the proper
    thread context.
    
    Tested via:
    
    * Run with a debug SMP build of the Erlang VM.  There are no
      `beam/global.h:1345: Lock check assertion` errors.
    * Use the following to run a large number of Map/Reduce jobs to
      try to provoke a memory leak.
    
    The following can be cut-and-paste'd into a Riak console/shell.
    On my MBP, it runs for (very roughly) an hour.  Perhaps it should
    run even longer to try to find very small memory leaks?
    
        {ok, C} = riak:local_client().
        [C:put(riak_object:new(<<"test">>, list_to_binary(integer_to_list(X)), list_to_binary(integer_to_list(X)))) || X <- lists:seq(1,500)].
        [C:put(riak_object:new(<<"test">>, list_to_binary(integer_to_list(X)) ,<<"98123489123498123498123498123893489712348974123789432789234178942318794213897234178912348791234789412378923417894123789412378941237894123789412387943128794312879123478941237894123789412378941239781243789213487914237891423789142378914234">>)) || X <- lists:seq(1,250)].
        io:format("Start time = ~p ~p\n", [time(), now()]), [ spawn(fun() -> {ok, C2} = riak:local_client(), [{ok,[_]} = C2:mapred_bucket(<<"test">>, [{map, {jsfun, <<"Riak.mapValuesJson">>}, none, false}, {reduce, {jsfun, <<"Riak.reduceSum">>}, none, true}]) || _ <- lists:seq(1,6*15)] , if YY == 1 -> os:cmd("say I am done now"), io:format("End time = ~p ~p\n", [time(), now()]); true -> ok end end) || YY <- lists:seq(1,200)].
    Scott Lystig Fritchie committed Nov 13, 2011
Commits on Nov 9, 2011
  1. Merge pull request #11 from basho/adt-bsd-support

    Add BSD support to erlang_js
    dizzyd committed Nov 9, 2011
Commits on Oct 5, 2011
  1. Add BSD support to erlang_js

    This patch adds .mk files for FreeBSD, NetBSD, OpenBSD and DragonFlyBSD.
    It also patches some nspr files so that nspr builds correctly for the
    BSDs as well.
    
    To workaround the hardcoded invocation of 'make' in rebar.config, the
    Makefile has been renamed GNUmakefile and a new BSD compatible stub
    Makefile has been added. Additionally, instead of using make -C, a new
    Makefile target has been added to both Makefiles, 'c_src' which does the
    directory change as part of the make rule. This fixes issues where BSD
    make does not support the -C option.
    
    $(MAKE) was not used, because we can not gurantee that the user built
    the top-level repo (eg riak) by using (g)make instead of calling rebar
    compile. Also, its unclear if rebar even supports the use of $(MAKE) in
    hook commands.
    Vagabond committed Apr 7, 2011
Commits on Sep 7, 2011
  1. Roll version 1.0.0

    Jared Morrow committed Sep 7, 2011
Commits on Aug 4, 2011
  1. Merge pull request #14 from basho/adt-readd-rebar

    Re-add rebar to the repository temporarily
    Vagabond committed Aug 4, 2011
  2. Re-add rebar to the repository temporarily

    This is only temporarily until the CI system handles the new rebar.mk
    setup correctly.
    Vagabond committed Aug 4, 2011
Commits on Jul 5, 2011
  1. Update rebar.mk

    dizzyd committed Jul 5, 2011
  2. Fix rebar deprecation warnings

    tuncer committed with dizzyd Apr 21, 2011