[SERVER-867] Shell toval crash with class stored as value Created: 02/Apr/10  Updated: 12/Jul/16  Resolved: 16/Jan/11

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.4.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Storlek Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Arch Linux, i686


Participants:

 Description   

The shell segfaults when fetching documents that have JS classes as their values:

> db.test.remove()
> db.test.insert(

{a:Object}

)
> db.test.find()
compile failed for: function Object() {
[native code]
}
Fri Apr 2 22:53:03 mongo got signal 11 (Segmentation fault), stack trace:
Fri Apr 2 22:53:03 0x808c3f5 0xb785d400 0xb76592d0 0x80f14d0 0x80e99a6 0xb7699db3 0xb769a12e 0xb7693ea4 0xb7686cb0 0xb7692a71 0xb765af6d 0xb765aff2 0xb765dc09 0x80eeea1 0x808efd5 0x80901a7 0xb741cb86 0x808b401
mongo(_Z12quitAbruptlyi+0x365) [0x808c3f5]
[0xb785d400]
/usr/lib/libjs.so(JS_GetFunctionObject+0x6) [0xb76592d0]
mongo(_ZN5mongo9Convertor5tovalERKNS_11BSONElementE+0x170) [0x80f14d0]
mongo(ZN5mongo16resolveBSONFieldEP9JSContextP8JSObjectljPS3+0x256) [0x80e99a6]
/usr/lib/libjs.so(js_LookupPropertyWithFlags+0x260) [0xb7699db3]
/usr/lib/libjs.so(js_LookupProperty+0x35) [0xb769a12e]
/usr/lib/libjs.so(js_CallIteratorNext+0x282) [0xb7693ea4]
/usr/lib/libjs.so(js_Interpret+0x131a) [0xb7686cb0]
/usr/lib/libjs.so(js_Execute+0x313) [0xb7692a71]
/usr/lib/libjs.so(JS_EvaluateUCScriptForPrincipals+0x90) [0xb765af6d]
/usr/lib/libjs.so(JS_EvaluateUCScript+0x43) [0xb765aff2]
/usr/lib/libjs.so(JS_EvaluateScript+0x68) [0xb765dc09]
mongo(_ZN5mongo7SMScope4execERKSsS2_bbbi+0x181) [0x80eeea1]
mongo(_Z5_mainiPPc+0x21e5) [0x808efd5]
mongo(main+0x37) [0x80901a7]
/lib/libc.so.6(__libc_start_main+0xe6) [0xb741cb86]
mongo() [0x808b401]



 Comments   
Comment by Eliot Horowitz (Inactive) [ 16/Jan/11 ]

This was fixed at some point

Generated at Thu Feb 08 02:55:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.