Hacker News new | past | comments | ask | show | jobs | submit login

Can you explain what's going on here?



There's two pieces of code that's fairly similar in semantics: both allocate a bunch of memory on the stack by declaring a large array. In the C version I make an array that easily spans multiple pages and as such writing to the end of it would skip over any guard page. In the Rust version you can see that a __rust_probestack function appears right as I approach the page size, which internally does stack probing to make sure that the guard page isn't skipped.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: