Jean-Sébastien Pédron
671c033623
Remove incorrect __restrict qualifier on several pointers
...
The typical case was:
static __inline int
convert_ccl(FILE *fp, char * __restrict p, [...])
{
[...]
if (p == SUPPRESS_PTR) {
[...]
} else {
[...]
}
[...]
}
This qualifier says that the pointer is the only one at that time
pointing to the resource.
Here, clang considers that "p" will never match "SUPPRESS_PTR" and
optimize the if{} block out. This leads to segfaults in programs calling
vfscanf(3) and vfwscanf(3) with just the format string (no arguments
following it).
The following softwares were reported to abort with segmentation fault
and this patch fixes it:
o cmake
o smartd
o devel/ORBit2
dim@ opened an LLVM PR to discuss this clang optimization:
http://llvm.org/bugs/show_bug.cgi?id=12656
Tested by: bsam@
2012-04-30 11:28:17 +00:00
..
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2008-05-05 16:03:52 +00:00
2009-03-04 03:38:51 +00:00
2012-04-24 17:51:36 +00:00
2008-05-10 18:39:20 +00:00
2008-05-05 16:03:52 +00:00
2009-01-28 14:38:41 +00:00
2008-05-05 16:03:52 +00:00
2009-02-28 06:00:58 +00:00
2010-05-13 12:07:55 +00:00
2012-04-29 16:28:39 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2008-05-05 16:03:52 +00:00
2012-04-24 17:51:36 +00:00
2011-10-21 06:35:58 +00:00
2011-10-21 06:35:58 +00:00
2008-04-22 17:03:32 +00:00
2011-11-20 14:45:42 +00:00
2007-04-19 14:01:04 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 07:31:27 +00:00
2010-01-10 14:30:30 +00:00
2010-12-09 20:28:30 +00:00
2011-11-20 14:45:42 +00:00
2007-06-18 02:13:04 +00:00
2008-04-17 22:17:54 +00:00
2009-12-05 19:31:38 +00:00
2009-11-25 04:21:42 +00:00
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2010-01-10 14:30:30 +00:00
2011-11-20 14:45:42 +00:00
2010-01-08 22:02:42 +00:00
2008-05-05 16:03:52 +00:00
2008-05-05 16:03:52 +00:00
2009-10-04 19:43:36 +00:00
2012-03-29 05:02:12 +00:00
2009-02-28 06:00:58 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-29 16:28:39 +00:00
2009-03-04 03:38:51 +00:00
2012-03-04 16:44:04 +00:00
2010-02-28 13:31:29 +00:00
2010-12-02 13:40:21 +00:00
2012-04-21 06:09:09 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2009-03-02 04:07:58 +00:00
2008-05-05 16:03:52 +00:00
2008-05-05 16:03:52 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2012-04-28 21:50:30 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2009-03-04 03:38:51 +00:00
2008-05-05 16:14:02 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2010-05-13 12:07:55 +00:00
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2012-04-30 11:28:17 +00:00
2012-04-21 06:10:18 +00:00
2012-04-30 11:28:17 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2010-05-13 12:07:55 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2009-01-08 06:38:06 +00:00
2011-03-06 19:47:46 +00:00
2010-03-11 17:03:32 +00:00