Why would this code produce a segfault? Why would this code produce a segfault? json json

Why would this code produce a segfault?


Aeson's encode function calls encodeUtf8 from the Data.Text package. That function uses unsafeDupablePerformIO and other unsafe functions to poke around in memory. That's possibly where the segfault happens.

See the code here.