{"action":"opened","issue":{"url":"https://api.github.com/repos/staticfloat/Nettle.jl/issues/44","labels_url":"https://api.github.com/repos/staticfloat/Nettle.jl/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/staticfloat/Nettle.jl/issues/44/comments","events_url":"https://api.github.com/repos/staticfloat/Nettle.jl/issues/44/events","html_url":"https://github.com/staticfloat/Nettle.jl/issues/44","id":71975327,"number":44,"title":"Segfault on nettle 3.1.1","user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-29T20:06:08Z","updated_at":"2015-04-29T20:06:08Z","closed_at":null,"body":"I've got the following segfault when running the tests on ArchLinux.\r\nJulia 0.4-dev (should not matter)\r\n\r\nBacktrace, \r\n```\r\n_nettle_aes_set_key at /usr/bin/../lib/libnettle.so (unknown line)\r\ncall at /usr/share/julia/site/v0.4/Nettle/src/cipher.jl:79\r\naes128_encrypt at /usr/share/julia/site/v0.4/Nettle/src/cipher.jl:117\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nanonymous at ./test.jl:87\r\ndo_test at ./test.jl:47\r\nanonymous at ./no file:29\r\nunknown function (ip: -140173077)\r\nunknown function (ip: -140170412)\r\njl_load at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: -185256800)\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: -184260780)\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: -140248077)\r\nunknown function (ip: -140251264)\r\nunknown function (ip: -140173274)\r\nunknown function (ip: -140170412)\r\njl_load at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: -186565232)\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\ninclude_from_node1 at ./loading.jl:129\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: -184311739)\r\nunknown function (ip: -184316692)\r\nunknown function (ip: -184314231)\r\njl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)\r\nunknown function (ip: 4200533)\r\nunknown function (ip: 4199391)\r\n__libc_start_main at /usr/bin/../lib/libc.so.6 (unknown line)\r\nunknown function (ip: 4199481)\r\nunknown function (ip: 0)\r\n```\r\n\r\nThe line number is a little bit confusing but apparently it was the line 78 `ccall` that causes the segfault.\r\n\r\nA quick look at my `nettle-meta.h` and [`nettle-types.h`](http://fossies.org/linux/nettle/nettle-types.h) shows that the signature of `nettle_set_key_func` doesn't have a `length` argument here\r\n\r\n```c\r\n/* Ciphers */\r\ntypedef void nettle_set_key_func(void *ctx, const uint8_t *key);\r\n```\r\n\r\nA google search lead me to [this](http://t124402.encryption-nettle-bugs.encryptiontalk.info/dropping-length-argument-from-nettle-set-key-func-t124402.html) post. I haven't read it through but it seems that there's a ABI break last year.\r\n\r\nThe construction of these functions are at runtime so I suppose it shouldn't be too hard to add additional version tests. However, I'm not familiar with nettle so I'm not sure what is the best way to do that.\r\n\r\nMy nettle soname is `libnettle.so.6` if that helps..\r\n\r\n@staticfloat (just to make sure the notification get through... ;P )\r\n"}}