Shell wants to limit line buffer to 4095 chars, apparently, but fails to enforce that limit when yanking from the kill buffer and instead segfaults.
Paste a longish (hundred chars) string into the shell, hit Esc-Delete to kill the string, hit Ctrl-Y until the shell crashes:
mongo got signal 11 (Segmentation fault: 11), stack trace: Fri Jan 4 13:27:51 0x10001ccdb 0x100022554 0x7fff97e678ea 0x1fffffffc 0x10004daea 0x10005233c 0x1000535f7 0x10002674f 0x100028c0a 0x1000208d8 0 mongo 0x000000010001ccdb _ZN5mongo15printStackTraceERSo + 43 1 mongo 0x0000000100022554 _Z12quitAbruptlyi + 964 2 libsystem_c.dylib 0x00007fff97e678ea _sigtramp + 26 3 ??? 0x00000001fffffffc 0x0 + 8589934588 4 mongo 0x000000010004daea _ZN11InputBuffer11refreshLineER10PromptBase + 1322 5 mongo 0x000000010005233c _ZN11InputBuffer12getInputLineER10PromptBase + 2812 6 mongo 0x00000001000535f7 _Z9linenoisePKc + 1479 7 mongo 0x000000010002674f _Z5_mainiPPc + 11167 8 mongo 0x0000000100028c0a main + 42 9 mongo 0x00000001000208d8 start + 52