[lkml]   [2002]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] C undefined behavior fix

(cc list trimmed) said:
> If you want a strcpy that isnt strcpy then change its name or use a
> different language 8)

The former is not necessarily sufficient in this case. You've still done the
broken pointer arithmetic, so even if the function isn't called strcpy() the
compiler is _still_ entitled to replace it with a call to memcpy() or even
machine_restart() before sleeping with your mother and starting WW III.

Granted, it probably _won't_ do any of those today, but you should know
better than to rely on that.

What part of 'undefined behaviour' is so difficult for people to understand?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [W:0.173 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site