seanjensengrey / mosh-scheme

Automatically exported from code.google.com/p/mosh-scheme
Other
0 stars 0 forks source link

segfault when using 'apply' with non-list #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  mosh> (apply + 1)

What is the expected output? What do you see instead?
Expected an error message complaining that the argument is not a list.
Instead it gives a segfault.

What version of the product are you using? On what operating system?
Mosh R6RS scheme interpreter, version 0.2.7 (revision master 2011/05/16 
23:25:58 mosh-0.2.5-638-gb8a1643)
Linux glimworm 2.6.39-1-amd64 #1 SMP Thu May 19 14:30:28 UTC 2011 x86_64 
GNU/Linux

Please provide any additional information below.
  Program received signal SIGSEGV, Segmentation fault.
  scheme::VM::runLoop (this=0xa04d20, code=<value optimized out>, returnPoint=<value optimized out>, returnTable=<value optimized out>) at src/call.inc.cpp:52
  52                                        push(lastPair.car());
  (gdb) bt
  #0  scheme::VM::runLoop (this=0xa04d20, code=<value optimized out>, returnPoint=<value optimized out>, returnTable=<value optimized out>) at src/call.inc.cpp:52
  #1  0x0000000000423138 in evaluateUnsafe (this=0xa04d20, code=0xd93000, codeSize=86737, isCompiler=false) at src/VM.cpp:402
  #2  scheme::VM::evaluateSafe (this=0xa04d20, code=0xd93000, codeSize=86737, isCompiler=false) at src/VM.cpp:416
  #3  0x00000000004281b5 in scheme::VM::activateR6RSMode (this=0xa04d20, image=0x5b7f00 "\004\321R\001", image_size=357814, isDebugExpand=<value optimized out>)
      at src/VM.cpp:849
  #4  0x000000000051d2ba in activateR6RSMode (vm=<value optimized out>, isDebugExpand=<value optimized out>) at src/main.cpp:121
  #5  0x0000000000409551 in main (argc=<value optimized out>, argv=<value
  optimized out>) at src/main.cpp:347

Cheers,
David

Original issue reported on code.google.com by amoe...@gmail.com on 24 May 2011 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by hige...@gmail.com on 24 May 2011 at 1:39

GoogleCodeExporter commented 9 years ago
Fixed Thanks. 
https://github.com/higepon/mosh/commit/cfe099a0b8f6715fb2af7ef5ba23264f1a1f29e9

To: okuoku
Please add this to the 0.2.7.

Original comment by hige...@gmail.com on 26 May 2011 at 7:33