From: Yukihiro Matsumoto Date: 2010-06-20T00:01:32+09:00 Subject: [ruby-core:30826] Re: [Bug #3454] Segfault with syscall Hi, In message "Re: [ruby-core:30824] [Bug #3454] Segfault with syscall" on Sat, 19 Jun 2010 21:04:16 +0900, Shyouhei Urabe writes: |Issue #3454 has been updated by Shyouhei Urabe. | |Ruby does not stop you to shoot your foot. I believe this is not a bug. Indeed. syscall expected buffer of sizeof(struct stat), but you gave it an empty string, so as natural consequence syscall overwrote memory region, and segmentation fault was happened. When you use syscall, it's fundamentally C programming with Ruby syntax, so you can do anything as bad as C can. Same rule applied to dl and ffi. I will restrict syscall to require $SAFE=0, just for fool proof. matz.