ClojureScript

Stack overflow error when adding large numerical keys to maps

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux 2.6.32-44-generic #98-Ubuntu SMP i686 GNU/Linux, java version "1.6.0_26", just bootstrapped clojurescript.

Description

The following code causes a stack overflow in Google Chrome browser and repljs. Transcript follows.

~/tools/clojurescript$  script/repljs
"Type: " :cljs/quit " to quit"
ClojureScript:cljs.user> (assoc {}
  154618822656 1
  261993005056 1)
"Error evaluating:" (assoc {} 154618822656 1 261993005056 1) :as "cljs.core.assoc.call(null,cljs.core.ObjMap.EMPTY,154618822656,1,261993005056,1);\n"
java.lang.StackOverflowError
        org.mozilla.javascript.NativeCall.<init>(NativeCall.java:65)
        org.mozilla.javascript.ScriptRuntime.createFunctionActivation(ScriptRuntime.java:3273)
        org.mozilla.javascript.gen.cljs_core_cljs_834._c__hash_1(cljs/core.cljs)
        org.mozilla.javascript.gen.cljs_core_cljs_834.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        org.mozilla.javascript.gen.cljs_core_cljs_909._c_anonymous_3(cljs/core.cljs:905)
        org.mozilla.javascript.gen.cljs_core_cljs_909.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        org.mozilla.javascript.gen.cljs_core_cljs_909._c_anonymous_5(cljs/core.cljs:913)
        org.mozilla.javascript.gen.cljs_core_cljs_909.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        org.mozilla.javascript.gen.cljs_core_cljs_909._c_anonymous_2(cljs/core.cljs:893)
        org.mozilla.javascript.gen.cljs_core_cljs_909.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        org.mozilla.javascript.gen.cljs_core_cljs_909._c_anonymous_5(cljs/core.cljs:911)
        org.mozilla.javascript.gen.cljs_core_cljs_909.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        org.mozilla.javascript.gen.cljs_core_cljs_1175._c_anonymous_2(cljs/core.cljs:4481)
        org.mozilla.javascript.gen.cljs_core_cljs_1175.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        org.mozilla.javascript.gen.cljs_core_cljs_1175._c_anonymous_4(cljs/core.cljs:4501)
        org.mozilla.javascript.gen.cljs_core_cljs_1175.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
        org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        org.mozilla.javascript.gen.cljs_core_cljs_1169._c_anonymous_12(cljs/core.cljs:4388)
        org.mozilla.javascript.gen.cljs_core_cljs_1169.call(cljs/core.cljs)
        org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        org.mozilla.javascript.gen.cljs_core_cljs_1175._c_anonymous_2(cljs/core.cljs:4486)
        org.mozilla.javascript.gen.cljs_core_cljs_1175.call(cljs/core.cljs)
        org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2521)
        org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
        org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: