Skip to content
Commits on Jun 12, 2012
  1. @jaredmorrow

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

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

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

    committed May 31, 2012
    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. Check for OOM conditions

    committed May 31, 2012
    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. Remove useless cast from void

    committed May 27, 2012
    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 committed May 17, 2012
    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 committed May 17, 2012
    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 committed May 16, 2012
    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 committed Apr 13, 2012
Commits on Mar 27, 2012
  1. @dizzyd

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

    dizzyd committed Mar 27, 2012
    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 committed Feb 19, 2012
Commits on Dec 29, 2011
  1. @slfritchie

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

    slfritchie committed Dec 29, 2011
    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 committed Dec 13, 2011
    …ERL_DRV_EXTENDED_MINOR_VERSION.
Commits on Nov 13, 2011
  1. @slfritchie

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

    slfritchie committed Nov 13, 2011
    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 committed Nov 9, 2011
    Add BSD support to erlang_js
Commits on Oct 5, 2011
  1. @Vagabond

    Add BSD support to erlang_js

    Vagabond committed Apr 7, 2011
    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 committed Sep 6, 2011
  2. @jaredmorrow
Commits on Aug 4, 2011
  1. @Vagabond

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

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

    Re-add rebar to the repository temporarily

    Vagabond committed Aug 4, 2011
    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 committed Jul 5, 2011
  2. @tuncer @dizzyd

    Fix rebar deprecation warnings

    tuncer committed with dizzyd Apr 21, 2011
  3. @dizzyd
Commits on Apr 22, 2011
  1. @Vagabond

    Bump to 0.6.1

    Vagabond committed Apr 22, 2011
  2. @Vagabond

    Move the call to end_request to before the context is destroyed

    Vagabond committed Apr 22, 2011
    Fixes az://322
    
    The way the code was on sm_stop, the driver's shutdown routine, was
    destroying the VM context before calling end_request, which was
    operating on the context. This simple change simply calls end_request
    before the context is destroyed.
Commits on Apr 8, 2011
  1. bumping to 0.6.0

    Bryan Fink committed Apr 8, 2011
Commits on Apr 5, 2011
  1. Slight refactoring of the on_branch function.

    Kelly McLaughlin committed Apr 5, 2011
  2. When stopping a Spidermonkey VM context make sure any executing JS fu…

    Kelly McLaughlin committed Apr 4, 2011
    …nctions are terminated before beginning to clean up memory.
  3. @argv0
  4. @jonmeredith
Commits on Apr 4, 2011
  1. @argv0
Something went wrong with that request. Please try again.