On Thu, Sep 12, 2013 at 04:05:48PM +0000, Joseph S. Myers wrote:
> cause stack overflow that doesn't get detected by the kernel. So maybe
> ubsan should imply -fstack-check or similar.
Well, I have a patch for that, but I no longer think that ubsan should
imply -fstack-check, since e.g.
int
main (void)
{
int x = -1;
int b[x - 4];
/* ... */
return 0;
}
segfaults at runtime on int b[x - 4]; line when -fstack-check is used
(even without sanitizing), so we wouldn't give proper diagnostics
for stmts following that line...
Marek