rudolph-miller / jonathan

JSON encoder and decoder.
http://rudolph-miller.github.io/jonathan/overview.html
164 stars 24 forks source link

got scary message using Jonathan with SBCL #29

Closed snmsts closed 9 years ago

snmsts commented 9 years ago

Hi,

I tried

ros -L sbcl-bin -s jonathan -e '(let(c d)(jonathan:to-json`(,@(when c`((:t .,c)))(:d .,(when d t))):from :alist))'

and got

CORRUPTION WARNING in SBCL pid 4242:
Memory fault at 0x190010 (pc=0x1005441d20, sp=0x51fe2f0)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.

I can reproduce the message on

$ uname -a
Darwin snmsts-air1-5644.local 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64

and same message I can see on

$ uname -a
Linux snmsts-lubuntu 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Thank you in advance.

rudolph-miller commented 9 years ago

Is it

(defun sample ()
  (let(c d) (jonathan:to-json`(,@(when c `((:t . ,c))) (:d . ,(when d t))) :from :alist)))
(sample)

going to cause the same error??

rudolph-miller commented 9 years ago

I meant not via ros -e.

rudolph-miller commented 9 years ago

Okay, I can reproduce the case

(jonathan.helper:compile-encoder (:from :alist) (c d) `(,@(when c `((:t . ,c))) (:d . ,(when d t))))

.

rudolph-miller commented 9 years ago

Now I got

ros -L sbcl-bin -s jonathan -e '(let(c d)(print (jonathan:to-json`(,@(when c`((:t .,c)))(:d .,(when d t))):from :alist)))'
=> "{\"D\":[]}"

.

snmsts commented 9 years ago

great! thanks.