5 ms·
Fail. I've ran it repeatedly over and over and it doesn't run forever. It segfaults or exits. But....you did cover a corner case I hadn't considered. Thanks!
by zedshaw 12y ago
Fail. I've ran it repeatedly over and over and it doesn't run forever. It segfaults or exits. But....you did cover a corner case I hadn't considered. Thanks!
https://gist.github.com/zedshaw/81edf35857e137ccd7d3 https://gist.github.com/zedshaw/81edf35857e137ccd7d3 is the results.
- mikeash 12y agoDid you adjust the offset like I said you would probably need to?
- mfukar 12y agoI can't see any changes in `safercopy` or in the calling code you provided - only the invocations from the shell showing the prog terminating.
- mikeash 12y agoMy point is that the offset value needed to produce the described behavior depends on various implementation-specific things, so that constant may need to be altered when trying the code on other compilers, OSes, or CPU architectures.
- deleted 12y ago[deleted]