Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jun 18, 2012
  1. @jonmeredith

    Merge pull request #25 from basho/jdm-make-permanent

    jonmeredith authored
    Lock spidermonkey_drv.so in memory so NSPR thread cleanup code runs.
Commits on Jun 15, 2012
  1. @jonmeredith
Commits on Jun 13, 2012
  1. @jaredmorrow

    Merge pull request #24 from basho/jem-fix-bsd-compile

    jaredmorrow authored
    Fix FreeBSD package compilation
  2. @jaredmorrow
  3. @jtuple
  4. @jtuple

    Fix pre-R15 compatibility

    jtuple authored
  5. @jaredmorrow
  6. @jaredmorrow

    Point to specific c_src/Makefile target to fix BSD make build

    jaredmorrow authored
    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.
Commits on Jun 12, 2012
  1. @jaredmorrow

    Merge pull request #19 from msantos/crash-on-oom

    jaredmorrow authored
    Crash on oom
Commits on May 31, 2012
  1. @msantos

    Avoid zeroing buf before copy

    msantos authored
  2. @msantos

    Correct arg passed to JS_DefineFunction

    msantos authored
    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 *)’
  3. @msantos

    Check for OOM conditions

    msantos authored
    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.
  4. @msantos

    Remove useless cast from void

    msantos authored
    Since driver_alloc() returns void, the cast is not required.
    
    Simplify the buffer size calculation as sizeof(char) is defined to be 1.
Commits on May 17, 2012
  1. @jaredmorrow
  2. @jaredmorrow

    Merge pull request #20 from basho/jem-15b-driver-changes

    jaredmorrow authored
    Change erlang_js driver to be compatible with R15 conventions
  3. @jaredmorrow
  4. @jaredmorrow

    Change driver_* calls to be compatible with new types in Erlang OTP R15

    jaredmorrow authored
    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).
Commits on May 16, 2012
  1. @jaredmorrow

    Turn on strict prototype checking and fix function prototypes

    jaredmorrow authored
    In C f() and f(void) are two different things.  If the function truly
    takes no arguments, f(void) is the proper definition.
Commits on Apr 13, 2012
  1. @jaredmorrow

    Roll version 1.0.2

    jaredmorrow authored
Commits on Mar 27, 2012
  1. @dizzyd

    Merge pull request #18 from basho/dss-fix-xcode43

    dizzyd authored
    Remove inline declarations; Xcode 4.3 does some strange stuff when inlin...
Commits on Mar 20, 2012
  1. @dizzyd
Commits on Feb 19, 2012
  1. @jaredmorrow

    Roll version 1.0.1

    jaredmorrow authored
Commits on Dec 29, 2011
  1. @slfritchie

    Merge pull request #15 from basho/bz1283-thread-safety

    slfritchie authored
    BUG 1283: erlang_js uses non-thread-safe driver function
Commits on Dec 16, 2011
  1. @kellymclaughlin
Commits on Dec 14, 2011
  1. @kellymclaughlin

    Change improper use of ERL_DRV_EXTENDED_MAJOR_VERSION to the correct …

    kellymclaughlin authored
    …ERL_DRV_EXTENDED_MINOR_VERSION.
Commits on Nov 13, 2011
  1. @slfritchie

    BUG 1283: erlang_js uses non-thread-safe driver function

    slfritchie authored
    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)].
Commits on Nov 9, 2011
  1. @dizzyd

    Merge pull request #11 from basho/adt-bsd-support

    dizzyd authored
    Add BSD support to erlang_js
Commits on Oct 5, 2011
  1. @Vagabond

    Add BSD support to erlang_js

    Vagabond authored
    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.
Commits on Sep 7, 2011
  1. @jaredmorrow

    Roll version 1.0.0

    jaredmorrow authored
  2. @jaredmorrow
Commits on Aug 4, 2011
  1. @Vagabond

    Merge pull request #14 from basho/adt-readd-rebar

    Vagabond authored
    Re-add rebar to the repository temporarily
  2. @Vagabond

    Re-add rebar to the repository temporarily

    Vagabond authored
    This is only temporarily until the CI system handles the new rebar.mk
    setup correctly.
Commits on Jul 5, 2011
  1. @dizzyd

    Update rebar.mk

    dizzyd authored
  2. @tuncer @dizzyd

    Fix rebar deprecation warnings

    tuncer authored dizzyd committed
  3. @dizzyd
Something went wrong with that request. Please try again.