├── Dockerfile ├── LICENSE.txt ├── README.md ├── benchmarks-memsafe ├── COMPILE ├── Makefile ├── Makefile.default ├── Makefile.inc.addresssanitizer ├── Makefile.inc.movec-memsafe ├── Makefile.inc.softboundcets ├── Makefile.inc.valgrind ├── SARD-testsuite-81 │ ├── addresssanitizer │ │ └── Makefile │ ├── movec-memsafe │ │ └── Makefile │ ├── softboundcets │ │ └── Makefile │ ├── src │ │ ├── Makefile │ │ └── src │ │ │ ├── basic-00001-min.c │ │ │ ├── basic-00034-min.c │ │ │ ├── basic-00045-min.c │ │ │ ├── basic-00182-min.c │ │ │ └── stack_overflow_loop.c │ ├── src_makefiles │ │ └── Makefile │ └── valgrind │ │ └── Makefile ├── SARD-testsuite-88 │ ├── addresssanitizer │ │ └── Makefile │ ├── movec-memsafe │ │ └── Makefile │ ├── softboundcets │ │ └── Makefile │ ├── src │ │ ├── 283 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── call_fb_realpath.c │ │ │ ├── my-include.h │ │ │ └── realpath-bad.c │ │ ├── 284 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── call_fb_realpath.c │ │ │ ├── my-include.h │ │ │ └── realpath-ok.c │ │ ├── 285 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── call-realpath-bad.c │ │ │ ├── my-include.h │ │ │ └── realpath-2.4.2.c │ │ ├── 286 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── call-realpath-ok.c │ │ │ ├── my-include.h │ │ │ └── realpath-2.4.2.c │ │ ├── 287 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── make-long-path.c │ │ │ ├── mapped-path-bad.c │ │ │ ├── my-include.h │ │ │ └── pathfile │ │ ├── 288 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── make-long-path.c │ │ │ ├── mapped-path-ok.c │ │ │ ├── my-include.h │ │ │ └── pathfile │ │ ├── 289 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── address_file │ │ │ ├── b4.in │ │ │ ├── create_address_file.c │ │ │ ├── my-named.h │ │ │ └── ns-lookup-bad.c │ │ ├── 290 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── address_file │ │ │ ├── b4.in │ │ │ ├── create_address_file.c │ │ │ ├── my-named.h │ │ │ └── ns-lookup-ok.c │ │ ├── 291 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create_msg_file.c │ │ │ ├── ns_defs.h │ │ │ ├── sig-bad.c │ │ │ └── test.c │ │ ├── 292 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create_msg_file.c │ │ │ ├── ns_defs.h │ │ │ ├── sig-ok.c │ │ │ └── test.c │ │ ├── 293 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create_msg_file.c │ │ │ ├── ns_defs.h │ │ │ └── nxt-bad.c │ │ ├── 294 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create_msg_file.c │ │ │ ├── ns_defs.h │ │ │ └── nxt-ok.c │ │ ├── 295 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── b3.in │ │ │ ├── create_iquery.c │ │ │ ├── iquery-bad.c │ │ │ └── iquery-file │ │ ├── 296 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── b3.in │ │ │ ├── create_iquery.c │ │ │ ├── iquery-file │ │ │ └── iquery-ok.c │ │ ├── 297 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── crackaddr-bad.c │ │ │ └── s1.in │ │ ├── 298 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── crackaddr-ok.c │ │ │ └── s1.in │ │ ├── 299 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── ge-bad.c │ │ │ ├── recipient.c │ │ │ ├── sendmail.h │ │ │ └── util.c │ │ ├── 300 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── ge-ok.c │ │ │ ├── recipient.c │ │ │ ├── sendmail.h │ │ │ └── util.c │ │ ├── 301 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── main.c │ │ │ ├── mime1-bad.c │ │ │ ├── my-sendmail.h │ │ │ └── s3.in │ │ ├── 302 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── main.c │ │ │ ├── mime1-ok.c │ │ │ ├── my-sendmail.h │ │ │ └── s3.in │ │ ├── 303 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── mime2-bad.c │ │ │ ├── mime2.h │ │ │ └── s4.in │ │ ├── 304 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── mime2-ok.c │ │ │ ├── mime2.h │ │ │ └── s4.in │ │ ├── 305 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ └── prescan-overflow-bad.c │ │ ├── 306 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ └── prescan-overflow-ok.c │ │ ├── 307 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── my-main.c │ │ │ ├── sendmail.h │ │ │ └── ttflag-bad.c │ │ ├── 308 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── my-main.c │ │ │ ├── sendmail.h │ │ │ └── ttflag-ok.c │ │ ├── 309 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create-dns-file.c │ │ │ ├── dns-file │ │ │ ├── my-util.c │ │ │ ├── txt-dns-file-bad.c │ │ │ └── txt-dns.h │ │ ├── 310 │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── create-dns-file.c │ │ │ ├── dns-file │ │ │ ├── my-util.c │ │ │ ├── txt-dns-file-ok.c │ │ │ └── txt-dns.h │ │ └── Makefile │ ├── src_makefiles │ │ ├── 283 │ │ │ └── Makefile │ │ ├── 284 │ │ │ └── Makefile │ │ ├── 285 │ │ │ └── Makefile │ │ ├── 286 │ │ │ └── Makefile │ │ ├── 287 │ │ │ └── Makefile │ │ ├── 288 │ │ │ └── Makefile │ │ ├── 289 │ │ │ └── Makefile │ │ ├── 290 │ │ │ └── Makefile │ │ ├── 291 │ │ │ └── Makefile │ │ ├── 292 │ │ │ └── Makefile │ │ ├── 293 │ │ │ └── Makefile │ │ ├── 294 │ │ │ └── Makefile │ │ ├── 295 │ │ │ └── Makefile │ │ ├── 296 │ │ │ └── Makefile │ │ ├── 297 │ │ │ └── Makefile │ │ ├── 298 │ │ │ └── Makefile │ │ ├── 299 │ │ │ └── Makefile │ │ ├── 300 │ │ │ └── Makefile │ │ ├── 301 │ │ │ └── Makefile │ │ ├── 302 │ │ │ └── Makefile │ │ ├── 303 │ │ │ └── Makefile │ │ ├── 304 │ │ │ └── Makefile │ │ ├── 305 │ │ │ └── Makefile │ │ ├── 306 │ │ │ └── Makefile │ │ ├── 307 │ │ │ └── Makefile │ │ ├── 308 │ │ │ └── Makefile │ │ ├── 309 │ │ │ └── Makefile │ │ ├── 310 │ │ │ └── Makefile │ │ └── Makefile │ └── valgrind │ │ └── Makefile ├── SARD-testsuite-89-2 │ ├── addresssanitizer │ │ └── Makefile │ ├── movec-memsafe │ │ └── Makefile │ ├── softboundcets │ │ └── Makefile │ ├── src │ │ ├── 000 │ │ │ ├── 831 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00180-large.c │ │ │ ├── 832 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00180-med.c │ │ │ ├── 833 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00180-min.c │ │ │ ├── 834 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00180-ok.c │ │ │ ├── 835 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00181-large.c │ │ │ ├── 836 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00181-med.c │ │ │ ├── 837 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00181-min.c │ │ │ ├── 838 │ │ │ │ ├── Makefile │ │ │ │ └── basic-00181-ok.c │ │ │ ├── 839 │ │ │ │ ├── Makefile │ │ │ │ ├── TestInputFile1 │ │ │ │ └── basic-00182-large.c │ │ │ ├── 840 │ │ │ │ ├── Makefile │ │ │ │ ├── TestInputFile1 │ │ │ │ └── basic-00182-med.c │ │ │ ├── 841 │ │ │ │ ├── Makefile │ │ │ │ ├── TestInputFile1 │ │ │ │ └── basic-00182-min.c │ │ │ └── 842 │ │ │ │ ├── Makefile │ │ │ │ ├── TestInputFile1 │ │ │ │ └── basic-00182-ok.c │ │ └── Makefile │ ├── src_makefiles │ │ ├── 000 │ │ │ ├── 831 │ │ │ │ └── Makefile │ │ │ ├── 832 │ │ │ │ └── Makefile │ │ │ ├── 833 │ │ │ │ └── Makefile │ │ │ ├── 834 │ │ │ │ └── Makefile │ │ │ ├── 835 │ │ │ │ └── Makefile │ │ │ ├── 836 │ │ │ │ └── Makefile │ │ │ ├── 837 │ │ │ │ └── Makefile │ │ │ ├── 838 │ │ │ │ └── Makefile │ │ │ ├── 839 │ │ │ │ └── Makefile │ │ │ ├── 840 │ │ │ │ └── Makefile │ │ │ ├── 841 │ │ │ │ └── Makefile │ │ │ └── 842 │ │ │ │ └── Makefile │ │ └── Makefile │ └── valgrind │ │ └── Makefile ├── SARD-testsuite-89 │ ├── addresssanitizer │ │ └── Makefile │ ├── movec-memsafe │ │ └── Makefile │ ├── softboundcets │ │ └── Makefile │ ├── src │ │ ├── 000 │ │ │ ├── 000 │ │ │ │ ├── 115 │ │ │ │ │ └── basic-00001-large.c │ │ │ │ ├── 116 │ │ │ │ │ └── basic-00001-med.c │ │ │ │ ├── 117 │ │ │ │ │ └── basic-00001-min.c │ │ │ │ ├── 118 │ │ │ │ │ └── basic-00001-ok.c │ │ │ │ ├── 119 │ │ │ │ │ └── basic-00002-large.c │ │ │ │ ├── 120 │ │ │ │ │ └── basic-00002-med.c │ │ │ │ ├── 121 │ │ │ │ │ └── basic-00002-min.c │ │ │ │ ├── 122 │ │ │ │ │ └── basic-00002-ok.c │ │ │ │ ├── 123 │ │ │ │ │ └── basic-00003-large.c │ │ │ │ ├── 124 │ │ │ │ │ └── basic-00003-med.c │ │ │ │ ├── 125 │ │ │ │ │ └── basic-00003-min.c │ │ │ │ ├── 126 │ │ │ │ │ └── basic-00003-ok.c │ │ │ │ ├── 127 │ │ │ │ │ └── basic-00004-large.c │ │ │ │ ├── 128 │ │ │ │ │ └── basic-00004-med.c │ │ │ │ ├── 129 │ │ │ │ │ └── basic-00004-min.c │ │ │ │ ├── 130 │ │ │ │ │ └── basic-00004-ok.c │ │ │ │ ├── 131 │ │ │ │ │ └── basic-00005-large.c │ │ │ │ ├── 132 │ │ │ │ │ └── basic-00005-med.c │ │ │ │ ├── 133 │ │ │ │ │ └── basic-00005-min.c │ │ │ │ ├── 134 │ │ │ │ │ └── basic-00005-ok.c │ │ │ │ ├── 135 │ │ │ │ │ └── basic-00006-large.c │ │ │ │ ├── 136 │ │ │ │ │ └── basic-00006-med.c │ │ │ │ ├── 137 │ │ │ │ │ └── basic-00006-min.c │ │ │ │ ├── 138 │ │ │ │ │ └── basic-00006-ok.c │ │ │ │ ├── 139 │ │ │ │ │ └── basic-00007-large.c │ │ │ │ ├── 140 │ │ │ │ │ └── basic-00007-med.c │ │ │ │ ├── 141 │ │ │ │ │ └── basic-00007-min.c │ │ │ │ ├── 142 │ │ │ │ │ └── basic-00007-ok.c │ │ │ │ ├── 143 │ │ │ │ │ └── basic-00008-large.c │ │ │ │ ├── 144 │ │ │ │ │ └── basic-00008-med.c │ │ │ │ ├── 145 │ │ │ │ │ └── basic-00008-min.c │ │ │ │ ├── 146 │ │ │ │ │ └── basic-00008-ok.c │ │ │ │ ├── 147 │ │ │ │ │ └── basic-00009-large.c │ │ │ │ ├── 148 │ │ │ │ │ └── basic-00009-med.c │ │ │ │ ├── 149 │ │ │ │ │ └── basic-00009-min.c │ │ │ │ ├── 150 │ │ │ │ │ └── basic-00009-ok.c │ │ │ │ ├── 151 │ │ │ │ │ └── basic-00010-large.c │ │ │ │ ├── 152 │ │ │ │ │ └── basic-00010-med.c │ │ │ │ ├── 153 │ │ │ │ │ └── basic-00010-min.c │ │ │ │ ├── 154 │ │ │ │ │ └── basic-00010-ok.c │ │ │ │ ├── 155 │ │ │ │ │ └── basic-00011-large.c │ │ │ │ ├── 156 │ │ │ │ │ └── basic-00011-med.c │ │ │ │ ├── 157 │ │ │ │ │ └── basic-00011-min.c │ │ │ │ ├── 158 │ │ │ │ │ └── basic-00011-ok.c │ │ │ │ ├── 159 │ │ │ │ │ └── basic-00012-large.c │ │ │ │ ├── 160 │ │ │ │ │ └── basic-00012-med.c │ │ │ │ ├── 161 │ │ │ │ │ └── basic-00012-min.c │ │ │ │ ├── 162 │ │ │ │ │ └── basic-00012-ok.c │ │ │ │ ├── 163 │ │ │ │ │ └── basic-00013-large.c │ │ │ │ ├── 164 │ │ │ │ │ └── basic-00013-med.c │ │ │ │ ├── 165 │ │ │ │ │ └── basic-00013-min.c │ │ │ │ ├── 166 │ │ │ │ │ └── basic-00013-ok.c │ │ │ │ ├── 167 │ │ │ │ │ └── basic-00014-large.c │ │ │ │ ├── 168 │ │ │ │ │ └── basic-00014-med.c │ │ │ │ ├── 169 │ │ │ │ │ └── basic-00014-min.c │ │ │ │ ├── 170 │ │ │ │ │ └── basic-00014-ok.c │ │ │ │ ├── 171 │ │ │ │ │ └── basic-00015-large.c │ │ │ │ ├── 172 │ │ │ │ │ └── basic-00015-med.c │ │ │ │ ├── 173 │ │ │ │ │ └── basic-00015-min.c │ │ │ │ ├── 174 │ │ │ │ │ └── basic-00015-ok.c │ │ │ │ ├── 175 │ │ │ │ │ └── basic-00016-large.c │ │ │ │ ├── 176 │ │ │ │ │ └── basic-00016-med.c │ │ │ │ ├── 177 │ │ │ │ │ └── basic-00016-min.c │ │ │ │ ├── 178 │ │ │ │ │ └── basic-00016-ok.c │ │ │ │ ├── 179 │ │ │ │ │ └── basic-00017-large.c │ │ │ │ ├── 180 │ │ │ │ │ └── basic-00017-med.c │ │ │ │ ├── 181 │ │ │ │ │ └── basic-00017-min.c │ │ │ │ ├── 182 │ │ │ │ │ └── basic-00017-ok.c │ │ │ │ ├── 183 │ │ │ │ │ └── basic-00018-large.c │ │ │ │ ├── 184 │ │ │ │ │ └── basic-00018-med.c │ │ │ │ ├── 185 │ │ │ │ │ └── basic-00018-min.c │ │ │ │ ├── 186 │ │ │ │ │ └── basic-00018-ok.c │ │ │ │ ├── 187 │ │ │ │ │ └── basic-00019-large.c │ │ │ │ ├── 188 │ │ │ │ │ └── basic-00019-med.c │ │ │ │ ├── 189 │ │ │ │ │ └── basic-00019-min.c │ │ │ │ ├── 190 │ │ │ │ │ └── basic-00019-ok.c │ │ │ │ ├── 191 │ │ │ │ │ └── basic-00020-large.c │ │ │ │ ├── 192 │ │ │ │ │ └── basic-00020-med.c │ │ │ │ ├── 193 │ │ │ │ │ └── basic-00020-min.c │ │ │ │ ├── 194 │ │ │ │ │ └── basic-00020-ok.c │ │ │ │ ├── 195 │ │ │ │ │ └── basic-00021-large.c │ │ │ │ ├── 196 │ │ │ │ │ └── basic-00021-med.c │ │ │ │ ├── 197 │ │ │ │ │ └── basic-00021-min.c │ │ │ │ ├── 198 │ │ │ │ │ └── basic-00021-ok.c │ │ │ │ ├── 199 │ │ │ │ │ └── basic-00022-large.c │ │ │ │ ├── 200 │ │ │ │ │ └── basic-00022-med.c │ │ │ │ ├── 201 │ │ │ │ │ └── basic-00022-min.c │ │ │ │ ├── 202 │ │ │ │ │ └── basic-00022-ok.c │ │ │ │ ├── 203 │ │ │ │ │ └── basic-00023-large.c │ │ │ │ ├── 204 │ │ │ │ │ └── basic-00023-med.c │ │ │ │ ├── 205 │ │ │ │ │ └── basic-00023-min.c │ │ │ │ ├── 206 │ │ │ │ │ └── basic-00023-ok.c │ │ │ │ ├── 207 │ │ │ │ │ └── basic-00024-large.c │ │ │ │ ├── 208 │ │ │ │ │ └── basic-00024-med.c │ │ │ │ ├── 209 │ │ │ │ │ └── basic-00024-min.c │ │ │ │ ├── 210 │ │ │ │ │ └── basic-00024-ok.c │ │ │ │ ├── 211 │ │ │ │ │ └── basic-00025-large.c │ │ │ │ ├── 212 │ │ │ │ │ └── basic-00025-med.c │ │ │ │ ├── 213 │ │ │ │ │ └── basic-00025-min.c │ │ │ │ ├── 214 │ │ │ │ │ └── basic-00025-ok.c │ │ │ │ ├── 215 │ │ │ │ │ └── basic-00026-large.c │ │ │ │ ├── 216 │ │ │ │ │ └── basic-00026-med.c │ │ │ │ ├── 217 │ │ │ │ │ └── basic-00026-min.c │ │ │ │ ├── 218 │ │ │ │ │ └── basic-00026-ok.c │ │ │ │ ├── 219 │ │ │ │ │ └── basic-00027-large.c │ │ │ │ ├── 220 │ │ │ │ │ └── basic-00027-med.c │ │ │ │ ├── 221 │ │ │ │ │ └── basic-00027-min.c │ │ │ │ ├── 222 │ │ │ │ │ └── basic-00027-ok.c │ │ │ │ ├── 223 │ │ │ │ │ └── basic-00028-large.c │ │ │ │ ├── 224 │ │ │ │ │ └── basic-00028-med.c │ │ │ │ ├── 225 │ │ │ │ │ └── basic-00028-min.c │ │ │ │ ├── 226 │ │ │ │ │ └── basic-00028-ok.c │ │ │ │ ├── 227 │ │ │ │ │ └── basic-00029-large.c │ │ │ │ ├── 228 │ │ │ │ │ └── basic-00029-med.c │ │ │ │ ├── 229 │ │ │ │ │ └── basic-00029-min.c │ │ │ │ ├── 230 │ │ │ │ │ └── basic-00029-ok.c │ │ │ │ ├── 231 │ │ │ │ │ └── basic-00030-large.c │ │ │ │ ├── 232 │ │ │ │ │ └── basic-00030-med.c │ │ │ │ ├── 233 │ │ │ │ │ └── basic-00030-min.c │ │ │ │ ├── 234 │ │ │ │ │ └── basic-00030-ok.c │ │ │ │ ├── 235 │ │ │ │ │ └── basic-00031-large.c │ │ │ │ ├── 236 │ │ │ │ │ └── basic-00031-med.c │ │ │ │ ├── 237 │ │ │ │ │ └── basic-00031-min.c │ │ │ │ ├── 238 │ │ │ │ │ └── basic-00031-ok.c │ │ │ │ ├── 239 │ │ │ │ │ └── basic-00032-large.c │ │ │ │ ├── 240 │ │ │ │ │ └── basic-00032-med.c │ │ │ │ ├── 241 │ │ │ │ │ └── basic-00032-min.c │ │ │ │ ├── 242 │ │ │ │ │ └── basic-00032-ok.c │ │ │ │ ├── 243 │ │ │ │ │ └── basic-00033-large.c │ │ │ │ ├── 244 │ │ │ │ │ └── basic-00033-med.c │ │ │ │ ├── 245 │ │ │ │ │ └── basic-00033-min.c │ │ │ │ ├── 246 │ │ │ │ │ └── basic-00033-ok.c │ │ │ │ ├── 247 │ │ │ │ │ └── basic-00034-large.c │ │ │ │ ├── 248 │ │ │ │ │ └── basic-00034-med.c │ │ │ │ ├── 249 │ │ │ │ │ └── basic-00034-min.c │ │ │ │ ├── 250 │ │ │ │ │ └── basic-00034-ok.c │ │ │ │ ├── 251 │ │ │ │ │ └── basic-00035-large.c │ │ │ │ ├── 252 │ │ │ │ │ └── basic-00035-med.c │ │ │ │ ├── 253 │ │ │ │ │ └── basic-00035-min.c │ │ │ │ ├── 254 │ │ │ │ │ └── basic-00035-ok.c │ │ │ │ ├── 255 │ │ │ │ │ └── basic-00036-large.c │ │ │ │ ├── 256 │ │ │ │ │ └── basic-00036-med.c │ │ │ │ ├── 257 │ │ │ │ │ └── basic-00036-min.c │ │ │ │ ├── 258 │ │ │ │ │ └── basic-00036-ok.c │ │ │ │ ├── 259 │ │ │ │ │ └── basic-00037-large.c │ │ │ │ ├── 260 │ │ │ │ │ └── basic-00037-med.c │ │ │ │ ├── 261 │ │ │ │ │ └── basic-00037-min.c │ │ │ │ ├── 262 │ │ │ │ │ └── basic-00037-ok.c │ │ │ │ ├── 263 │ │ │ │ │ └── basic-00038-large.c │ │ │ │ ├── 264 │ │ │ │ │ └── basic-00038-med.c │ │ │ │ ├── 265 │ │ │ │ │ └── basic-00038-min.c │ │ │ │ ├── 266 │ │ │ │ │ └── basic-00038-ok.c │ │ │ │ ├── 267 │ │ │ │ │ └── basic-00039-large.c │ │ │ │ ├── 268 │ │ │ │ │ └── basic-00039-med.c │ │ │ │ ├── 269 │ │ │ │ │ └── basic-00039-min.c │ │ │ │ ├── 270 │ │ │ │ │ └── basic-00039-ok.c │ │ │ │ ├── 271 │ │ │ │ │ └── basic-00040-large.c │ │ │ │ ├── 272 │ │ │ │ │ └── basic-00040-med.c │ │ │ │ ├── 273 │ │ │ │ │ └── basic-00040-min.c │ │ │ │ ├── 274 │ │ │ │ │ └── basic-00040-ok.c │ │ │ │ ├── 275 │ │ │ │ │ └── basic-00041-large.c │ │ │ │ ├── 276 │ │ │ │ │ └── basic-00041-med.c │ │ │ │ ├── 277 │ │ │ │ │ └── basic-00041-min.c │ │ │ │ ├── 278 │ │ │ │ │ └── basic-00041-ok.c │ │ │ │ ├── 279 │ │ │ │ │ └── basic-00042-large.c │ │ │ │ ├── 280 │ │ │ │ │ └── basic-00042-med.c │ │ │ │ ├── 281 │ │ │ │ │ └── basic-00042-min.c │ │ │ │ ├── 282 │ │ │ │ │ └── basic-00042-ok.c │ │ │ │ ├── 283 │ │ │ │ │ └── basic-00043-large.c │ │ │ │ ├── 284 │ │ │ │ │ └── basic-00043-med.c │ │ │ │ ├── 285 │ │ │ │ │ └── basic-00043-min.c │ │ │ │ ├── 286 │ │ │ │ │ └── basic-00043-ok.c │ │ │ │ ├── 287 │ │ │ │ │ └── basic-00044-large.c │ │ │ │ ├── 288 │ │ │ │ │ └── basic-00044-med.c │ │ │ │ ├── 289 │ │ │ │ │ └── basic-00044-min.c │ │ │ │ ├── 290 │ │ │ │ │ └── basic-00044-ok.c │ │ │ │ ├── 291 │ │ │ │ │ └── basic-00045-large.c │ │ │ │ ├── 292 │ │ │ │ │ └── basic-00045-med.c │ │ │ │ ├── 293 │ │ │ │ │ └── basic-00045-min.c │ │ │ │ ├── 294 │ │ │ │ │ └── basic-00045-ok.c │ │ │ │ ├── 295 │ │ │ │ │ └── basic-00046-large.c │ │ │ │ ├── 296 │ │ │ │ │ └── basic-00046-med.c │ │ │ │ ├── 297 │ │ │ │ │ └── basic-00046-min.c │ │ │ │ ├── 298 │ │ │ │ │ └── basic-00046-ok.c │ │ │ │ ├── 299 │ │ │ │ │ └── basic-00047-large.c │ │ │ │ ├── 300 │ │ │ │ │ └── basic-00047-med.c │ │ │ │ ├── 301 │ │ │ │ │ └── basic-00047-min.c │ │ │ │ ├── 302 │ │ │ │ │ └── basic-00047-ok.c │ │ │ │ ├── 303 │ │ │ │ │ └── basic-00048-large.c │ │ │ │ ├── 304 │ │ │ │ │ └── basic-00048-med.c │ │ │ │ ├── 305 │ │ │ │ │ └── basic-00048-min.c │ │ │ │ ├── 306 │ │ │ │ │ └── basic-00048-ok.c │ │ │ │ ├── 307 │ │ │ │ │ └── basic-00049-large.c │ │ │ │ ├── 308 │ │ │ │ │ └── basic-00049-med.c │ │ │ │ ├── 309 │ │ │ │ │ └── basic-00049-min.c │ │ │ │ ├── 310 │ │ │ │ │ └── basic-00049-ok.c │ │ │ │ ├── 311 │ │ │ │ │ └── basic-00050-large.c │ │ │ │ ├── 312 │ │ │ │ │ └── basic-00050-med.c │ │ │ │ ├── 313 │ │ │ │ │ └── basic-00050-min.c │ │ │ │ ├── 314 │ │ │ │ │ └── basic-00050-ok.c │ │ │ │ ├── 315 │ │ │ │ │ └── basic-00051-large.c │ │ │ │ ├── 316 │ │ │ │ │ └── basic-00051-med.c │ │ │ │ ├── 317 │ │ │ │ │ └── basic-00051-min.c │ │ │ │ ├── 318 │ │ │ │ │ └── basic-00051-ok.c │ │ │ │ ├── 319 │ │ │ │ │ └── basic-00052-large.c │ │ │ │ ├── 320 │ │ │ │ │ └── basic-00052-med.c │ │ │ │ ├── 321 │ │ │ │ │ └── basic-00052-min.c │ │ │ │ ├── 322 │ │ │ │ │ └── basic-00052-ok.c │ │ │ │ ├── 323 │ │ │ │ │ └── basic-00053-large.c │ │ │ │ ├── 324 │ │ │ │ │ └── basic-00053-med.c │ │ │ │ ├── 325 │ │ │ │ │ └── basic-00053-min.c │ │ │ │ ├── 326 │ │ │ │ │ └── basic-00053-ok.c │ │ │ │ ├── 327 │ │ │ │ │ └── basic-00054-large.c │ │ │ │ ├── 328 │ │ │ │ │ └── basic-00054-med.c │ │ │ │ ├── 329 │ │ │ │ │ └── basic-00054-min.c │ │ │ │ ├── 330 │ │ │ │ │ └── basic-00054-ok.c │ │ │ │ ├── 331 │ │ │ │ │ └── basic-00055-large.c │ │ │ │ ├── 332 │ │ │ │ │ └── basic-00055-med.c │ │ │ │ ├── 333 │ │ │ │ │ └── basic-00055-min.c │ │ │ │ ├── 334 │ │ │ │ │ └── basic-00055-ok.c │ │ │ │ ├── 335 │ │ │ │ │ └── basic-00056-large.c │ │ │ │ ├── 336 │ │ │ │ │ └── basic-00056-med.c │ │ │ │ ├── 337 │ │ │ │ │ └── basic-00056-min.c │ │ │ │ ├── 338 │ │ │ │ │ └── basic-00056-ok.c │ │ │ │ ├── 339 │ │ │ │ │ └── basic-00057-large.c │ │ │ │ ├── 340 │ │ │ │ │ └── basic-00057-med.c │ │ │ │ ├── 341 │ │ │ │ │ └── basic-00057-min.c │ │ │ │ ├── 342 │ │ │ │ │ └── basic-00057-ok.c │ │ │ │ ├── 343 │ │ │ │ │ └── basic-00058-large.c │ │ │ │ ├── 344 │ │ │ │ │ └── basic-00058-med.c │ │ │ │ ├── 345 │ │ │ │ │ └── basic-00058-min.c │ │ │ │ ├── 346 │ │ │ │ │ └── basic-00058-ok.c │ │ │ │ ├── 347 │ │ │ │ │ └── basic-00059-large.c │ │ │ │ ├── 348 │ │ │ │ │ └── basic-00059-med.c │ │ │ │ ├── 349 │ │ │ │ │ └── basic-00059-min.c │ │ │ │ ├── 350 │ │ │ │ │ └── basic-00059-ok.c │ │ │ │ ├── 351 │ │ │ │ │ └── basic-00060-large.c │ │ │ │ ├── 352 │ │ │ │ │ └── basic-00060-med.c │ │ │ │ ├── 353 │ │ │ │ │ └── basic-00060-min.c │ │ │ │ ├── 354 │ │ │ │ │ └── basic-00060-ok.c │ │ │ │ ├── 355 │ │ │ │ │ └── basic-00061-large.c │ │ │ │ ├── 356 │ │ │ │ │ └── basic-00061-med.c │ │ │ │ ├── 357 │ │ │ │ │ └── basic-00061-min.c │ │ │ │ ├── 358 │ │ │ │ │ └── basic-00061-ok.c │ │ │ │ ├── 359 │ │ │ │ │ └── basic-00062-large.c │ │ │ │ ├── 360 │ │ │ │ │ └── basic-00062-med.c │ │ │ │ ├── 361 │ │ │ │ │ └── basic-00062-min.c │ │ │ │ ├── 362 │ │ │ │ │ └── basic-00062-ok.c │ │ │ │ ├── 363 │ │ │ │ │ └── basic-00063-large.c │ │ │ │ ├── 364 │ │ │ │ │ └── basic-00063-med.c │ │ │ │ ├── 365 │ │ │ │ │ └── basic-00063-min.c │ │ │ │ ├── 366 │ │ │ │ │ └── basic-00063-ok.c │ │ │ │ ├── 367 │ │ │ │ │ └── basic-00064-large.c │ │ │ │ ├── 368 │ │ │ │ │ └── basic-00064-med.c │ │ │ │ ├── 369 │ │ │ │ │ └── basic-00064-min.c │ │ │ │ ├── 370 │ │ │ │ │ └── basic-00064-ok.c │ │ │ │ ├── 371 │ │ │ │ │ └── basic-00065-large.c │ │ │ │ ├── 372 │ │ │ │ │ └── basic-00065-med.c │ │ │ │ ├── 373 │ │ │ │ │ └── basic-00065-min.c │ │ │ │ ├── 374 │ │ │ │ │ └── basic-00065-ok.c │ │ │ │ ├── 375 │ │ │ │ │ └── basic-00066-large.c │ │ │ │ ├── 376 │ │ │ │ │ └── basic-00066-med.c │ │ │ │ ├── 377 │ │ │ │ │ └── basic-00066-min.c │ │ │ │ ├── 378 │ │ │ │ │ └── basic-00066-ok.c │ │ │ │ ├── 379 │ │ │ │ │ └── basic-00067-large.c │ │ │ │ ├── 380 │ │ │ │ │ └── basic-00067-med.c │ │ │ │ ├── 381 │ │ │ │ │ └── basic-00067-min.c │ │ │ │ ├── 382 │ │ │ │ │ └── basic-00067-ok.c │ │ │ │ ├── 383 │ │ │ │ │ └── basic-00068-large.c │ │ │ │ ├── 384 │ │ │ │ │ └── basic-00068-med.c │ │ │ │ ├── 385 │ │ │ │ │ └── basic-00068-min.c │ │ │ │ ├── 386 │ │ │ │ │ └── basic-00068-ok.c │ │ │ │ ├── 387 │ │ │ │ │ └── basic-00069-large.c │ │ │ │ ├── 388 │ │ │ │ │ └── basic-00069-med.c │ │ │ │ ├── 389 │ │ │ │ │ └── basic-00069-min.c │ │ │ │ ├── 390 │ │ │ │ │ └── basic-00069-ok.c │ │ │ │ ├── 391 │ │ │ │ │ └── basic-00070-large.c │ │ │ │ ├── 392 │ │ │ │ │ └── basic-00070-med.c │ │ │ │ ├── 393 │ │ │ │ │ └── basic-00070-min.c │ │ │ │ ├── 394 │ │ │ │ │ └── basic-00070-ok.c │ │ │ │ ├── 395 │ │ │ │ │ └── basic-00071-large.c │ │ │ │ ├── 396 │ │ │ │ │ └── basic-00071-med.c │ │ │ │ ├── 397 │ │ │ │ │ └── basic-00071-min.c │ │ │ │ ├── 398 │ │ │ │ │ └── basic-00071-ok.c │ │ │ │ ├── 399 │ │ │ │ │ └── basic-00072-large.c │ │ │ │ ├── 400 │ │ │ │ │ └── basic-00072-med.c │ │ │ │ ├── 401 │ │ │ │ │ └── basic-00072-min.c │ │ │ │ ├── 402 │ │ │ │ │ └── basic-00072-ok.c │ │ │ │ ├── 403 │ │ │ │ │ └── basic-00073-large.c │ │ │ │ ├── 404 │ │ │ │ │ └── basic-00073-med.c │ │ │ │ ├── 405 │ │ │ │ │ └── basic-00073-min.c │ │ │ │ ├── 406 │ │ │ │ │ └── basic-00073-ok.c │ │ │ │ ├── 407 │ │ │ │ │ └── basic-00074-large.c │ │ │ │ ├── 408 │ │ │ │ │ └── basic-00074-med.c │ │ │ │ ├── 409 │ │ │ │ │ └── basic-00074-min.c │ │ │ │ ├── 410 │ │ │ │ │ └── basic-00074-ok.c │ │ │ │ ├── 411 │ │ │ │ │ └── basic-00075-large.c │ │ │ │ ├── 412 │ │ │ │ │ └── basic-00075-med.c │ │ │ │ ├── 413 │ │ │ │ │ └── basic-00075-min.c │ │ │ │ ├── 414 │ │ │ │ │ └── basic-00075-ok.c │ │ │ │ ├── 415 │ │ │ │ │ └── basic-00076-large.c │ │ │ │ ├── 416 │ │ │ │ │ └── basic-00076-med.c │ │ │ │ ├── 417 │ │ │ │ │ └── basic-00076-min.c │ │ │ │ ├── 418 │ │ │ │ │ └── basic-00076-ok.c │ │ │ │ ├── 419 │ │ │ │ │ └── basic-00077-large.c │ │ │ │ ├── 420 │ │ │ │ │ └── basic-00077-med.c │ │ │ │ ├── 421 │ │ │ │ │ └── basic-00077-min.c │ │ │ │ ├── 422 │ │ │ │ │ └── basic-00077-ok.c │ │ │ │ ├── 423 │ │ │ │ │ └── basic-00078-large.c │ │ │ │ ├── 424 │ │ │ │ │ └── basic-00078-med.c │ │ │ │ ├── 425 │ │ │ │ │ └── basic-00078-min.c │ │ │ │ ├── 426 │ │ │ │ │ └── basic-00078-ok.c │ │ │ │ ├── 427 │ │ │ │ │ └── basic-00079-large.c │ │ │ │ ├── 428 │ │ │ │ │ └── basic-00079-med.c │ │ │ │ ├── 429 │ │ │ │ │ └── basic-00079-min.c │ │ │ │ ├── 430 │ │ │ │ │ └── basic-00079-ok.c │ │ │ │ ├── 431 │ │ │ │ │ └── basic-00080-large.c │ │ │ │ ├── 432 │ │ │ │ │ └── basic-00080-med.c │ │ │ │ ├── 433 │ │ │ │ │ └── basic-00080-min.c │ │ │ │ ├── 434 │ │ │ │ │ └── basic-00080-ok.c │ │ │ │ ├── 435 │ │ │ │ │ └── basic-00081-large.c │ │ │ │ ├── 436 │ │ │ │ │ └── basic-00081-med.c │ │ │ │ ├── 437 │ │ │ │ │ └── basic-00081-min.c │ │ │ │ ├── 438 │ │ │ │ │ └── basic-00081-ok.c │ │ │ │ ├── 439 │ │ │ │ │ └── basic-00082-large.c │ │ │ │ ├── 440 │ │ │ │ │ └── basic-00082-med.c │ │ │ │ ├── 441 │ │ │ │ │ └── basic-00082-min.c │ │ │ │ ├── 442 │ │ │ │ │ └── basic-00082-ok.c │ │ │ │ ├── 443 │ │ │ │ │ └── basic-00083-large.c │ │ │ │ ├── 444 │ │ │ │ │ └── basic-00083-med.c │ │ │ │ ├── 445 │ │ │ │ │ └── basic-00083-min.c │ │ │ │ ├── 446 │ │ │ │ │ └── basic-00083-ok.c │ │ │ │ ├── 447 │ │ │ │ │ └── basic-00084-large.c │ │ │ │ ├── 448 │ │ │ │ │ └── basic-00084-med.c │ │ │ │ ├── 449 │ │ │ │ │ └── basic-00084-min.c │ │ │ │ ├── 450 │ │ │ │ │ └── basic-00084-ok.c │ │ │ │ ├── 451 │ │ │ │ │ └── basic-00085-large.c │ │ │ │ ├── 452 │ │ │ │ │ └── basic-00085-med.c │ │ │ │ ├── 453 │ │ │ │ │ └── basic-00085-min.c │ │ │ │ ├── 454 │ │ │ │ │ └── basic-00085-ok.c │ │ │ │ ├── 455 │ │ │ │ │ └── basic-00086-large.c │ │ │ │ ├── 456 │ │ │ │ │ └── basic-00086-med.c │ │ │ │ ├── 457 │ │ │ │ │ └── basic-00086-min.c │ │ │ │ ├── 458 │ │ │ │ │ └── basic-00086-ok.c │ │ │ │ ├── 459 │ │ │ │ │ └── basic-00087-large.c │ │ │ │ ├── 460 │ │ │ │ │ └── basic-00087-med.c │ │ │ │ ├── 461 │ │ │ │ │ └── basic-00087-min.c │ │ │ │ ├── 462 │ │ │ │ │ └── basic-00087-ok.c │ │ │ │ ├── 463 │ │ │ │ │ └── basic-00088-large.c │ │ │ │ ├── 464 │ │ │ │ │ └── basic-00088-med.c │ │ │ │ ├── 465 │ │ │ │ │ └── basic-00088-min.c │ │ │ │ ├── 466 │ │ │ │ │ └── basic-00088-ok.c │ │ │ │ ├── 467 │ │ │ │ │ └── basic-00089-large.c │ │ │ │ ├── 468 │ │ │ │ │ └── basic-00089-med.c │ │ │ │ ├── 469 │ │ │ │ │ └── basic-00089-min.c │ │ │ │ ├── 470 │ │ │ │ │ └── basic-00089-ok.c │ │ │ │ ├── 471 │ │ │ │ │ └── basic-00090-large.c │ │ │ │ ├── 472 │ │ │ │ │ └── basic-00090-med.c │ │ │ │ ├── 473 │ │ │ │ │ └── basic-00090-min.c │ │ │ │ ├── 474 │ │ │ │ │ └── basic-00090-ok.c │ │ │ │ ├── 475 │ │ │ │ │ └── basic-00091-large.c │ │ │ │ ├── 476 │ │ │ │ │ └── basic-00091-med.c │ │ │ │ ├── 477 │ │ │ │ │ └── basic-00091-min.c │ │ │ │ ├── 478 │ │ │ │ │ └── basic-00091-ok.c │ │ │ │ ├── 479 │ │ │ │ │ └── basic-00092-large.c │ │ │ │ ├── 480 │ │ │ │ │ └── basic-00092-med.c │ │ │ │ ├── 481 │ │ │ │ │ └── basic-00092-min.c │ │ │ │ ├── 482 │ │ │ │ │ └── basic-00092-ok.c │ │ │ │ ├── 483 │ │ │ │ │ └── basic-00093-large.c │ │ │ │ ├── 484 │ │ │ │ │ └── basic-00093-med.c │ │ │ │ ├── 485 │ │ │ │ │ └── basic-00093-min.c │ │ │ │ ├── 486 │ │ │ │ │ └── basic-00093-ok.c │ │ │ │ ├── 487 │ │ │ │ │ └── basic-00094-large.c │ │ │ │ ├── 488 │ │ │ │ │ └── basic-00094-med.c │ │ │ │ ├── 489 │ │ │ │ │ └── basic-00094-min.c │ │ │ │ ├── 490 │ │ │ │ │ └── basic-00094-ok.c │ │ │ │ ├── 491 │ │ │ │ │ └── basic-00095-large.c │ │ │ │ ├── 492 │ │ │ │ │ └── basic-00095-med.c │ │ │ │ ├── 493 │ │ │ │ │ └── basic-00095-min.c │ │ │ │ ├── 494 │ │ │ │ │ └── basic-00095-ok.c │ │ │ │ ├── 495 │ │ │ │ │ └── basic-00096-large.c │ │ │ │ ├── 496 │ │ │ │ │ └── basic-00096-med.c │ │ │ │ ├── 497 │ │ │ │ │ └── basic-00096-min.c │ │ │ │ ├── 498 │ │ │ │ │ └── basic-00096-ok.c │ │ │ │ ├── 499 │ │ │ │ │ └── basic-00097-large.c │ │ │ │ ├── 500 │ │ │ │ │ └── basic-00097-med.c │ │ │ │ ├── 501 │ │ │ │ │ └── basic-00097-min.c │ │ │ │ ├── 502 │ │ │ │ │ └── basic-00097-ok.c │ │ │ │ ├── 503 │ │ │ │ │ └── basic-00098-large.c │ │ │ │ ├── 504 │ │ │ │ │ └── basic-00098-med.c │ │ │ │ ├── 505 │ │ │ │ │ └── basic-00098-min.c │ │ │ │ ├── 506 │ │ │ │ │ └── basic-00098-ok.c │ │ │ │ ├── 507 │ │ │ │ │ └── basic-00099-large.c │ │ │ │ ├── 508 │ │ │ │ │ └── basic-00099-med.c │ │ │ │ ├── 509 │ │ │ │ │ └── basic-00099-min.c │ │ │ │ ├── 510 │ │ │ │ │ └── basic-00099-ok.c │ │ │ │ ├── 511 │ │ │ │ │ └── basic-00100-large.c │ │ │ │ ├── 512 │ │ │ │ │ └── basic-00100-med.c │ │ │ │ ├── 513 │ │ │ │ │ └── basic-00100-min.c │ │ │ │ ├── 514 │ │ │ │ │ └── basic-00100-ok.c │ │ │ │ ├── 515 │ │ │ │ │ └── basic-00101-large.c │ │ │ │ ├── 516 │ │ │ │ │ └── basic-00101-med.c │ │ │ │ ├── 517 │ │ │ │ │ └── basic-00101-min.c │ │ │ │ ├── 518 │ │ │ │ │ └── basic-00101-ok.c │ │ │ │ ├── 519 │ │ │ │ │ └── basic-00102-large.c │ │ │ │ ├── 520 │ │ │ │ │ └── basic-00102-med.c │ │ │ │ ├── 521 │ │ │ │ │ └── basic-00102-min.c │ │ │ │ ├── 522 │ │ │ │ │ └── basic-00102-ok.c │ │ │ │ ├── 523 │ │ │ │ │ └── basic-00103-large.c │ │ │ │ ├── 524 │ │ │ │ │ └── basic-00103-med.c │ │ │ │ ├── 525 │ │ │ │ │ └── basic-00103-min.c │ │ │ │ ├── 526 │ │ │ │ │ └── basic-00103-ok.c │ │ │ │ ├── 527 │ │ │ │ │ └── basic-00104-large.c │ │ │ │ ├── 528 │ │ │ │ │ └── basic-00104-med.c │ │ │ │ ├── 529 │ │ │ │ │ └── basic-00104-min.c │ │ │ │ ├── 530 │ │ │ │ │ └── basic-00104-ok.c │ │ │ │ ├── 531 │ │ │ │ │ └── basic-00105-large.c │ │ │ │ ├── 532 │ │ │ │ │ └── basic-00105-med.c │ │ │ │ ├── 533 │ │ │ │ │ └── basic-00105-min.c │ │ │ │ ├── 534 │ │ │ │ │ └── basic-00105-ok.c │ │ │ │ ├── 535 │ │ │ │ │ └── basic-00106-large.c │ │ │ │ ├── 536 │ │ │ │ │ └── basic-00106-med.c │ │ │ │ ├── 537 │ │ │ │ │ └── basic-00106-min.c │ │ │ │ ├── 538 │ │ │ │ │ └── basic-00106-ok.c │ │ │ │ ├── 539 │ │ │ │ │ └── basic-00107-large.c │ │ │ │ ├── 540 │ │ │ │ │ └── basic-00107-med.c │ │ │ │ ├── 541 │ │ │ │ │ └── basic-00107-min.c │ │ │ │ ├── 542 │ │ │ │ │ └── basic-00107-ok.c │ │ │ │ ├── 543 │ │ │ │ │ └── basic-00108-large.c │ │ │ │ ├── 544 │ │ │ │ │ └── basic-00108-med.c │ │ │ │ ├── 545 │ │ │ │ │ └── basic-00108-min.c │ │ │ │ ├── 546 │ │ │ │ │ └── basic-00108-ok.c │ │ │ │ ├── 547 │ │ │ │ │ └── basic-00109-large.c │ │ │ │ ├── 548 │ │ │ │ │ └── basic-00109-med.c │ │ │ │ ├── 549 │ │ │ │ │ └── basic-00109-min.c │ │ │ │ ├── 550 │ │ │ │ │ └── basic-00109-ok.c │ │ │ │ ├── 551 │ │ │ │ │ └── basic-00110-large.c │ │ │ │ ├── 552 │ │ │ │ │ └── basic-00110-med.c │ │ │ │ ├── 553 │ │ │ │ │ └── basic-00110-min.c │ │ │ │ ├── 554 │ │ │ │ │ └── basic-00110-ok.c │ │ │ │ ├── 555 │ │ │ │ │ └── basic-00111-large.c │ │ │ │ ├── 556 │ │ │ │ │ └── basic-00111-med.c │ │ │ │ ├── 557 │ │ │ │ │ └── basic-00111-min.c │ │ │ │ ├── 558 │ │ │ │ │ └── basic-00111-ok.c │ │ │ │ ├── 559 │ │ │ │ │ └── basic-00112-large.c │ │ │ │ ├── 560 │ │ │ │ │ └── basic-00112-med.c │ │ │ │ ├── 561 │ │ │ │ │ └── basic-00112-min.c │ │ │ │ ├── 562 │ │ │ │ │ └── basic-00112-ok.c │ │ │ │ ├── 563 │ │ │ │ │ └── basic-00113-large.c │ │ │ │ ├── 564 │ │ │ │ │ └── basic-00113-med.c │ │ │ │ ├── 565 │ │ │ │ │ └── basic-00113-min.c │ │ │ │ ├── 566 │ │ │ │ │ └── basic-00113-ok.c │ │ │ │ ├── 567 │ │ │ │ │ └── basic-00114-large.c │ │ │ │ ├── 568 │ │ │ │ │ └── basic-00114-med.c │ │ │ │ ├── 569 │ │ │ │ │ └── basic-00114-min.c │ │ │ │ ├── 570 │ │ │ │ │ └── basic-00114-ok.c │ │ │ │ ├── 571 │ │ │ │ │ └── basic-00115-large.c │ │ │ │ ├── 572 │ │ │ │ │ └── basic-00115-med.c │ │ │ │ ├── 573 │ │ │ │ │ └── basic-00115-min.c │ │ │ │ ├── 574 │ │ │ │ │ └── basic-00115-ok.c │ │ │ │ ├── 575 │ │ │ │ │ └── basic-00116-large.c │ │ │ │ ├── 576 │ │ │ │ │ └── basic-00116-med.c │ │ │ │ ├── 577 │ │ │ │ │ └── basic-00116-min.c │ │ │ │ ├── 578 │ │ │ │ │ └── basic-00116-ok.c │ │ │ │ ├── 579 │ │ │ │ │ └── basic-00117-large.c │ │ │ │ ├── 580 │ │ │ │ │ └── basic-00117-med.c │ │ │ │ ├── 581 │ │ │ │ │ └── basic-00117-min.c │ │ │ │ ├── 582 │ │ │ │ │ └── basic-00117-ok.c │ │ │ │ ├── 583 │ │ │ │ │ └── basic-00118-large.c │ │ │ │ ├── 584 │ │ │ │ │ └── basic-00118-med.c │ │ │ │ ├── 585 │ │ │ │ │ └── basic-00118-min.c │ │ │ │ ├── 586 │ │ │ │ │ └── basic-00118-ok.c │ │ │ │ ├── 587 │ │ │ │ │ └── basic-00119-large.c │ │ │ │ ├── 588 │ │ │ │ │ └── basic-00119-med.c │ │ │ │ ├── 589 │ │ │ │ │ └── basic-00119-min.c │ │ │ │ ├── 590 │ │ │ │ │ └── basic-00119-ok.c │ │ │ │ ├── 591 │ │ │ │ │ └── basic-00120-large.c │ │ │ │ ├── 592 │ │ │ │ │ └── basic-00120-med.c │ │ │ │ ├── 593 │ │ │ │ │ └── basic-00120-min.c │ │ │ │ ├── 594 │ │ │ │ │ └── basic-00120-ok.c │ │ │ │ ├── 595 │ │ │ │ │ └── basic-00121-large.c │ │ │ │ ├── 596 │ │ │ │ │ └── basic-00121-med.c │ │ │ │ ├── 597 │ │ │ │ │ └── basic-00121-min.c │ │ │ │ ├── 598 │ │ │ │ │ └── basic-00121-ok.c │ │ │ │ ├── 599 │ │ │ │ │ └── basic-00122-large.c │ │ │ │ ├── 600 │ │ │ │ │ └── basic-00122-med.c │ │ │ │ ├── 601 │ │ │ │ │ └── basic-00122-min.c │ │ │ │ ├── 602 │ │ │ │ │ └── basic-00122-ok.c │ │ │ │ ├── 603 │ │ │ │ │ └── basic-00123-large.c │ │ │ │ ├── 604 │ │ │ │ │ └── basic-00123-med.c │ │ │ │ ├── 605 │ │ │ │ │ └── basic-00123-min.c │ │ │ │ ├── 606 │ │ │ │ │ └── basic-00123-ok.c │ │ │ │ ├── 607 │ │ │ │ │ └── basic-00124-large.c │ │ │ │ ├── 608 │ │ │ │ │ └── basic-00124-med.c │ │ │ │ ├── 609 │ │ │ │ │ └── basic-00124-min.c │ │ │ │ ├── 610 │ │ │ │ │ └── basic-00124-ok.c │ │ │ │ ├── 611 │ │ │ │ │ └── basic-00125-large.c │ │ │ │ ├── 612 │ │ │ │ │ └── basic-00125-med.c │ │ │ │ ├── 613 │ │ │ │ │ └── basic-00125-min.c │ │ │ │ ├── 614 │ │ │ │ │ └── basic-00125-ok.c │ │ │ │ ├── 615 │ │ │ │ │ └── basic-00126-large.c │ │ │ │ ├── 616 │ │ │ │ │ └── basic-00126-med.c │ │ │ │ ├── 617 │ │ │ │ │ └── basic-00126-min.c │ │ │ │ ├── 618 │ │ │ │ │ └── basic-00126-ok.c │ │ │ │ ├── 619 │ │ │ │ │ └── basic-00127-large.c │ │ │ │ ├── 620 │ │ │ │ │ └── basic-00127-med.c │ │ │ │ ├── 621 │ │ │ │ │ └── basic-00127-min.c │ │ │ │ ├── 622 │ │ │ │ │ └── basic-00127-ok.c │ │ │ │ ├── 623 │ │ │ │ │ └── basic-00128-large.c │ │ │ │ ├── 624 │ │ │ │ │ └── basic-00128-med.c │ │ │ │ ├── 625 │ │ │ │ │ └── basic-00128-min.c │ │ │ │ ├── 626 │ │ │ │ │ └── basic-00128-ok.c │ │ │ │ ├── 627 │ │ │ │ │ └── basic-00129-large.c │ │ │ │ ├── 628 │ │ │ │ │ └── basic-00129-med.c │ │ │ │ ├── 629 │ │ │ │ │ └── basic-00129-min.c │ │ │ │ ├── 630 │ │ │ │ │ └── basic-00129-ok.c │ │ │ │ ├── 631 │ │ │ │ │ └── basic-00130-large.c │ │ │ │ ├── 632 │ │ │ │ │ └── basic-00130-med.c │ │ │ │ ├── 633 │ │ │ │ │ └── basic-00130-min.c │ │ │ │ ├── 634 │ │ │ │ │ └── basic-00130-ok.c │ │ │ │ ├── 635 │ │ │ │ │ └── basic-00131-large.c │ │ │ │ ├── 636 │ │ │ │ │ └── basic-00131-med.c │ │ │ │ ├── 637 │ │ │ │ │ └── basic-00131-min.c │ │ │ │ ├── 638 │ │ │ │ │ └── basic-00131-ok.c │ │ │ │ ├── 639 │ │ │ │ │ └── basic-00132-large.c │ │ │ │ ├── 640 │ │ │ │ │ └── basic-00132-med.c │ │ │ │ ├── 641 │ │ │ │ │ └── basic-00132-min.c │ │ │ │ ├── 642 │ │ │ │ │ └── basic-00132-ok.c │ │ │ │ ├── 643 │ │ │ │ │ └── basic-00133-large.c │ │ │ │ ├── 644 │ │ │ │ │ └── basic-00133-med.c │ │ │ │ ├── 645 │ │ │ │ │ └── basic-00133-min.c │ │ │ │ ├── 646 │ │ │ │ │ └── basic-00133-ok.c │ │ │ │ ├── 647 │ │ │ │ │ └── basic-00134-large.c │ │ │ │ ├── 648 │ │ │ │ │ └── basic-00134-med.c │ │ │ │ ├── 649 │ │ │ │ │ └── basic-00134-min.c │ │ │ │ ├── 650 │ │ │ │ │ └── basic-00134-ok.c │ │ │ │ ├── 651 │ │ │ │ │ └── basic-00135-large.c │ │ │ │ ├── 652 │ │ │ │ │ └── basic-00135-med.c │ │ │ │ ├── 653 │ │ │ │ │ └── basic-00135-min.c │ │ │ │ ├── 654 │ │ │ │ │ └── basic-00135-ok.c │ │ │ │ ├── 655 │ │ │ │ │ └── basic-00136-large.c │ │ │ │ ├── 656 │ │ │ │ │ └── basic-00136-med.c │ │ │ │ ├── 657 │ │ │ │ │ └── basic-00136-min.c │ │ │ │ ├── 658 │ │ │ │ │ └── basic-00136-ok.c │ │ │ │ ├── 659 │ │ │ │ │ └── basic-00137-large.c │ │ │ │ ├── 660 │ │ │ │ │ └── basic-00137-med.c │ │ │ │ ├── 661 │ │ │ │ │ └── basic-00137-min.c │ │ │ │ ├── 662 │ │ │ │ │ └── basic-00137-ok.c │ │ │ │ ├── 663 │ │ │ │ │ └── basic-00138-large.c │ │ │ │ ├── 664 │ │ │ │ │ └── basic-00138-med.c │ │ │ │ ├── 665 │ │ │ │ │ └── basic-00138-min.c │ │ │ │ ├── 666 │ │ │ │ │ └── basic-00138-ok.c │ │ │ │ ├── 667 │ │ │ │ │ └── basic-00139-large.c │ │ │ │ ├── 668 │ │ │ │ │ └── basic-00139-med.c │ │ │ │ ├── 669 │ │ │ │ │ └── basic-00139-min.c │ │ │ │ ├── 670 │ │ │ │ │ └── basic-00139-ok.c │ │ │ │ ├── 671 │ │ │ │ │ └── basic-00140-large.c │ │ │ │ ├── 672 │ │ │ │ │ └── basic-00140-med.c │ │ │ │ ├── 673 │ │ │ │ │ └── basic-00140-min.c │ │ │ │ ├── 674 │ │ │ │ │ └── basic-00140-ok.c │ │ │ │ ├── 675 │ │ │ │ │ └── basic-00141-large.c │ │ │ │ ├── 676 │ │ │ │ │ └── basic-00141-med.c │ │ │ │ ├── 677 │ │ │ │ │ └── basic-00141-min.c │ │ │ │ ├── 678 │ │ │ │ │ └── basic-00141-ok.c │ │ │ │ ├── 679 │ │ │ │ │ └── basic-00142-large.c │ │ │ │ ├── 680 │ │ │ │ │ └── basic-00142-med.c │ │ │ │ ├── 681 │ │ │ │ │ └── basic-00142-min.c │ │ │ │ ├── 682 │ │ │ │ │ └── basic-00142-ok.c │ │ │ │ ├── 683 │ │ │ │ │ └── basic-00143-large.c │ │ │ │ ├── 684 │ │ │ │ │ └── basic-00143-med.c │ │ │ │ ├── 685 │ │ │ │ │ └── basic-00143-min.c │ │ │ │ ├── 686 │ │ │ │ │ └── basic-00143-ok.c │ │ │ │ ├── 687 │ │ │ │ │ └── basic-00144-large.c │ │ │ │ ├── 688 │ │ │ │ │ └── basic-00144-med.c │ │ │ │ ├── 689 │ │ │ │ │ └── basic-00144-min.c │ │ │ │ ├── 690 │ │ │ │ │ └── basic-00144-ok.c │ │ │ │ ├── 691 │ │ │ │ │ └── basic-00145-large.c │ │ │ │ ├── 692 │ │ │ │ │ └── basic-00145-med.c │ │ │ │ ├── 693 │ │ │ │ │ └── basic-00145-min.c │ │ │ │ ├── 694 │ │ │ │ │ └── basic-00145-ok.c │ │ │ │ ├── 695 │ │ │ │ │ └── basic-00146-large.c │ │ │ │ ├── 696 │ │ │ │ │ └── basic-00146-med.c │ │ │ │ ├── 697 │ │ │ │ │ └── basic-00146-min.c │ │ │ │ ├── 698 │ │ │ │ │ └── basic-00146-ok.c │ │ │ │ ├── 699 │ │ │ │ │ └── basic-00147-large.c │ │ │ │ ├── 700 │ │ │ │ │ └── basic-00147-med.c │ │ │ │ ├── 701 │ │ │ │ │ └── basic-00147-min.c │ │ │ │ ├── 702 │ │ │ │ │ └── basic-00147-ok.c │ │ │ │ ├── 703 │ │ │ │ │ └── basic-00148-large.c │ │ │ │ ├── 704 │ │ │ │ │ └── basic-00148-med.c │ │ │ │ ├── 705 │ │ │ │ │ └── basic-00148-min.c │ │ │ │ ├── 706 │ │ │ │ │ └── basic-00148-ok.c │ │ │ │ ├── 707 │ │ │ │ │ └── basic-00149-large.c │ │ │ │ ├── 708 │ │ │ │ │ └── basic-00149-med.c │ │ │ │ ├── 709 │ │ │ │ │ └── basic-00149-min.c │ │ │ │ ├── 710 │ │ │ │ │ └── basic-00149-ok.c │ │ │ │ ├── 711 │ │ │ │ │ └── basic-00150-large.c │ │ │ │ ├── 712 │ │ │ │ │ └── basic-00150-med.c │ │ │ │ ├── 713 │ │ │ │ │ └── basic-00150-min.c │ │ │ │ ├── 714 │ │ │ │ │ └── basic-00150-ok.c │ │ │ │ ├── 715 │ │ │ │ │ └── basic-00151-large.c │ │ │ │ ├── 716 │ │ │ │ │ └── basic-00151-med.c │ │ │ │ ├── 717 │ │ │ │ │ └── basic-00151-min.c │ │ │ │ ├── 718 │ │ │ │ │ └── basic-00151-ok.c │ │ │ │ ├── 719 │ │ │ │ │ └── basic-00152-large.c │ │ │ │ ├── 720 │ │ │ │ │ └── basic-00152-med.c │ │ │ │ ├── 721 │ │ │ │ │ └── basic-00152-min.c │ │ │ │ ├── 722 │ │ │ │ │ └── basic-00152-ok.c │ │ │ │ ├── 723 │ │ │ │ │ └── basic-00153-large.c │ │ │ │ ├── 724 │ │ │ │ │ └── basic-00153-med.c │ │ │ │ ├── 725 │ │ │ │ │ └── basic-00153-min.c │ │ │ │ ├── 726 │ │ │ │ │ └── basic-00153-ok.c │ │ │ │ ├── 727 │ │ │ │ │ └── basic-00154-large.c │ │ │ │ ├── 728 │ │ │ │ │ └── basic-00154-med.c │ │ │ │ ├── 729 │ │ │ │ │ └── basic-00154-min.c │ │ │ │ ├── 730 │ │ │ │ │ └── basic-00154-ok.c │ │ │ │ ├── 731 │ │ │ │ │ └── basic-00155-large.c │ │ │ │ ├── 732 │ │ │ │ │ └── basic-00155-med.c │ │ │ │ ├── 733 │ │ │ │ │ └── basic-00155-min.c │ │ │ │ ├── 734 │ │ │ │ │ └── basic-00155-ok.c │ │ │ │ ├── 735 │ │ │ │ │ └── basic-00156-large.c │ │ │ │ ├── 736 │ │ │ │ │ └── basic-00156-med.c │ │ │ │ ├── 737 │ │ │ │ │ └── basic-00156-min.c │ │ │ │ ├── 738 │ │ │ │ │ └── basic-00156-ok.c │ │ │ │ ├── 739 │ │ │ │ │ └── basic-00157-large.c │ │ │ │ ├── 740 │ │ │ │ │ └── basic-00157-med.c │ │ │ │ ├── 741 │ │ │ │ │ └── basic-00157-min.c │ │ │ │ ├── 742 │ │ │ │ │ └── basic-00157-ok.c │ │ │ │ ├── 743 │ │ │ │ │ └── basic-00158-large.c │ │ │ │ ├── 744 │ │ │ │ │ └── basic-00158-med.c │ │ │ │ ├── 745 │ │ │ │ │ └── basic-00158-min.c │ │ │ │ ├── 746 │ │ │ │ │ └── basic-00158-ok.c │ │ │ │ ├── 747 │ │ │ │ │ └── basic-00159-large.c │ │ │ │ ├── 748 │ │ │ │ │ └── basic-00159-med.c │ │ │ │ ├── 749 │ │ │ │ │ └── basic-00159-min.c │ │ │ │ ├── 750 │ │ │ │ │ └── basic-00159-ok.c │ │ │ │ ├── 751 │ │ │ │ │ └── basic-00160-large.c │ │ │ │ ├── 752 │ │ │ │ │ └── basic-00160-med.c │ │ │ │ ├── 753 │ │ │ │ │ └── basic-00160-min.c │ │ │ │ ├── 754 │ │ │ │ │ └── basic-00160-ok.c │ │ │ │ ├── 755 │ │ │ │ │ └── basic-00161-large.c │ │ │ │ ├── 756 │ │ │ │ │ └── basic-00161-med.c │ │ │ │ ├── 757 │ │ │ │ │ └── basic-00161-min.c │ │ │ │ ├── 758 │ │ │ │ │ └── basic-00161-ok.c │ │ │ │ ├── 759 │ │ │ │ │ └── basic-00162-large.c │ │ │ │ ├── 760 │ │ │ │ │ └── basic-00162-med.c │ │ │ │ ├── 761 │ │ │ │ │ └── basic-00162-min.c │ │ │ │ ├── 762 │ │ │ │ │ └── basic-00162-ok.c │ │ │ │ ├── 763 │ │ │ │ │ └── basic-00163-large.c │ │ │ │ ├── 764 │ │ │ │ │ └── basic-00163-med.c │ │ │ │ ├── 765 │ │ │ │ │ └── basic-00163-min.c │ │ │ │ ├── 766 │ │ │ │ │ └── basic-00163-ok.c │ │ │ │ ├── 767 │ │ │ │ │ └── basic-00164-large.c │ │ │ │ ├── 768 │ │ │ │ │ └── basic-00164-med.c │ │ │ │ ├── 769 │ │ │ │ │ └── basic-00164-min.c │ │ │ │ ├── 770 │ │ │ │ │ └── basic-00164-ok.c │ │ │ │ ├── 771 │ │ │ │ │ └── basic-00165-large.c │ │ │ │ ├── 772 │ │ │ │ │ └── basic-00165-med.c │ │ │ │ ├── 773 │ │ │ │ │ └── basic-00165-min.c │ │ │ │ ├── 774 │ │ │ │ │ └── basic-00165-ok.c │ │ │ │ ├── 775 │ │ │ │ │ └── basic-00166-large.c │ │ │ │ ├── 776 │ │ │ │ │ └── basic-00166-med.c │ │ │ │ ├── 777 │ │ │ │ │ └── basic-00166-min.c │ │ │ │ ├── 778 │ │ │ │ │ └── basic-00166-ok.c │ │ │ │ ├── 779 │ │ │ │ │ └── basic-00167-large.c │ │ │ │ ├── 780 │ │ │ │ │ └── basic-00167-med.c │ │ │ │ ├── 781 │ │ │ │ │ └── basic-00167-min.c │ │ │ │ ├── 782 │ │ │ │ │ └── basic-00167-ok.c │ │ │ │ ├── 783 │ │ │ │ │ └── basic-00168-large.c │ │ │ │ ├── 784 │ │ │ │ │ └── basic-00168-med.c │ │ │ │ ├── 785 │ │ │ │ │ └── basic-00168-min.c │ │ │ │ ├── 786 │ │ │ │ │ └── basic-00168-ok.c │ │ │ │ ├── 787 │ │ │ │ │ └── basic-00169-large.c │ │ │ │ ├── 788 │ │ │ │ │ └── basic-00169-med.c │ │ │ │ ├── 789 │ │ │ │ │ └── basic-00169-min.c │ │ │ │ ├── 790 │ │ │ │ │ └── basic-00169-ok.c │ │ │ │ ├── 791 │ │ │ │ │ └── basic-00170-large.c │ │ │ │ ├── 792 │ │ │ │ │ └── basic-00170-med.c │ │ │ │ ├── 793 │ │ │ │ │ └── basic-00170-min.c │ │ │ │ ├── 794 │ │ │ │ │ └── basic-00170-ok.c │ │ │ │ ├── 795 │ │ │ │ │ └── basic-00171-large.c │ │ │ │ ├── 796 │ │ │ │ │ └── basic-00171-med.c │ │ │ │ ├── 797 │ │ │ │ │ └── basic-00171-min.c │ │ │ │ ├── 798 │ │ │ │ │ └── basic-00171-ok.c │ │ │ │ ├── 799 │ │ │ │ │ └── basic-00172-large.c │ │ │ │ ├── 800 │ │ │ │ │ └── basic-00172-med.c │ │ │ │ ├── 801 │ │ │ │ │ └── basic-00172-min.c │ │ │ │ ├── 802 │ │ │ │ │ └── basic-00172-ok.c │ │ │ │ ├── 803 │ │ │ │ │ └── basic-00173-large.c │ │ │ │ ├── 804 │ │ │ │ │ └── basic-00173-med.c │ │ │ │ ├── 805 │ │ │ │ │ └── basic-00173-min.c │ │ │ │ ├── 806 │ │ │ │ │ └── basic-00173-ok.c │ │ │ │ ├── 807 │ │ │ │ │ └── basic-00174-large.c │ │ │ │ ├── 808 │ │ │ │ │ └── basic-00174-med.c │ │ │ │ ├── 809 │ │ │ │ │ └── basic-00174-min.c │ │ │ │ ├── 810 │ │ │ │ │ └── basic-00174-ok.c │ │ │ │ ├── 811 │ │ │ │ │ └── basic-00175-large.c │ │ │ │ ├── 812 │ │ │ │ │ └── basic-00175-med.c │ │ │ │ ├── 813 │ │ │ │ │ └── basic-00175-min.c │ │ │ │ ├── 814 │ │ │ │ │ └── basic-00175-ok.c │ │ │ │ ├── 815 │ │ │ │ │ └── basic-00176-large.c │ │ │ │ ├── 816 │ │ │ │ │ └── basic-00176-med.c │ │ │ │ ├── 817 │ │ │ │ │ └── basic-00176-min.c │ │ │ │ ├── 818 │ │ │ │ │ └── basic-00176-ok.c │ │ │ │ ├── 819 │ │ │ │ │ └── basic-00177-large.c │ │ │ │ ├── 820 │ │ │ │ │ └── basic-00177-med.c │ │ │ │ ├── 821 │ │ │ │ │ └── basic-00177-min.c │ │ │ │ ├── 822 │ │ │ │ │ └── basic-00177-ok.c │ │ │ │ ├── 823 │ │ │ │ │ └── basic-00178-large.c │ │ │ │ ├── 824 │ │ │ │ │ └── basic-00178-med.c │ │ │ │ ├── 825 │ │ │ │ │ └── basic-00178-min.c │ │ │ │ ├── 826 │ │ │ │ │ └── basic-00178-ok.c │ │ │ │ ├── 827 │ │ │ │ │ └── basic-00179-large.c │ │ │ │ ├── 828 │ │ │ │ │ └── basic-00179-med.c │ │ │ │ ├── 829 │ │ │ │ │ └── basic-00179-min.c │ │ │ │ ├── 830 │ │ │ │ │ └── basic-00179-ok.c │ │ │ │ ├── 843 │ │ │ │ │ └── basic-00183-large.c │ │ │ │ ├── 844 │ │ │ │ │ └── basic-00183-med.c │ │ │ │ ├── 845 │ │ │ │ │ └── basic-00183-min.c │ │ │ │ ├── 846 │ │ │ │ │ └── basic-00183-ok.c │ │ │ │ ├── 847 │ │ │ │ │ └── basic-00184-large.c │ │ │ │ ├── 848 │ │ │ │ │ └── basic-00184-med.c │ │ │ │ ├── 849 │ │ │ │ │ └── basic-00184-min.c │ │ │ │ ├── 850 │ │ │ │ │ └── basic-00184-ok.c │ │ │ │ ├── 851 │ │ │ │ │ └── basic-00185-large.c │ │ │ │ ├── 852 │ │ │ │ │ └── basic-00185-med.c │ │ │ │ ├── 853 │ │ │ │ │ └── basic-00185-min.c │ │ │ │ ├── 854 │ │ │ │ │ └── basic-00185-ok.c │ │ │ │ ├── 855 │ │ │ │ │ └── basic-00186-large.c │ │ │ │ ├── 856 │ │ │ │ │ └── basic-00186-med.c │ │ │ │ ├── 857 │ │ │ │ │ └── basic-00186-min.c │ │ │ │ ├── 858 │ │ │ │ │ └── basic-00186-ok.c │ │ │ │ ├── 859 │ │ │ │ │ └── basic-00187-large.c │ │ │ │ ├── 860 │ │ │ │ │ └── basic-00187-med.c │ │ │ │ ├── 861 │ │ │ │ │ └── basic-00187-min.c │ │ │ │ ├── 862 │ │ │ │ │ └── basic-00187-ok.c │ │ │ │ ├── 863 │ │ │ │ │ └── basic-00188-large.c │ │ │ │ ├── 864 │ │ │ │ │ └── basic-00188-med.c │ │ │ │ ├── 865 │ │ │ │ │ └── basic-00188-min.c │ │ │ │ ├── 866 │ │ │ │ │ └── basic-00188-ok.c │ │ │ │ ├── 867 │ │ │ │ │ └── basic-00189-large.c │ │ │ │ ├── 868 │ │ │ │ │ └── basic-00189-med.c │ │ │ │ ├── 869 │ │ │ │ │ └── basic-00189-min.c │ │ │ │ ├── 870 │ │ │ │ │ └── basic-00189-ok.c │ │ │ │ ├── 871 │ │ │ │ │ └── basic-00190-large.c │ │ │ │ ├── 872 │ │ │ │ │ └── basic-00190-med.c │ │ │ │ ├── 873 │ │ │ │ │ └── basic-00190-min.c │ │ │ │ ├── 874 │ │ │ │ │ └── basic-00190-ok.c │ │ │ │ ├── 875 │ │ │ │ │ └── basic-00191-large.c │ │ │ │ ├── 876 │ │ │ │ │ └── basic-00191-med.c │ │ │ │ ├── 877 │ │ │ │ │ └── basic-00191-min.c │ │ │ │ ├── 878 │ │ │ │ │ └── basic-00191-ok.c │ │ │ │ ├── 879 │ │ │ │ │ └── basic-00192-large.c │ │ │ │ ├── 880 │ │ │ │ │ └── basic-00192-med.c │ │ │ │ ├── 881 │ │ │ │ │ └── basic-00192-min.c │ │ │ │ ├── 882 │ │ │ │ │ └── basic-00192-ok.c │ │ │ │ ├── 883 │ │ │ │ │ └── basic-00193-large.c │ │ │ │ ├── 884 │ │ │ │ │ └── basic-00193-med.c │ │ │ │ ├── 885 │ │ │ │ │ └── basic-00193-min.c │ │ │ │ ├── 886 │ │ │ │ │ └── basic-00193-ok.c │ │ │ │ ├── 887 │ │ │ │ │ └── basic-00194-large.c │ │ │ │ ├── 888 │ │ │ │ │ └── basic-00194-med.c │ │ │ │ ├── 889 │ │ │ │ │ └── basic-00194-min.c │ │ │ │ ├── 890 │ │ │ │ │ └── basic-00194-ok.c │ │ │ │ ├── 891 │ │ │ │ │ └── basic-00195-large.c │ │ │ │ ├── 892 │ │ │ │ │ └── basic-00195-med.c │ │ │ │ ├── 893 │ │ │ │ │ └── basic-00195-min.c │ │ │ │ ├── 894 │ │ │ │ │ └── basic-00195-ok.c │ │ │ │ ├── 895 │ │ │ │ │ └── basic-00196-large.c │ │ │ │ ├── 896 │ │ │ │ │ └── basic-00196-med.c │ │ │ │ ├── 897 │ │ │ │ │ └── basic-00196-min.c │ │ │ │ ├── 898 │ │ │ │ │ └── basic-00196-ok.c │ │ │ │ ├── 899 │ │ │ │ │ └── basic-00197-large.c │ │ │ │ ├── 900 │ │ │ │ │ └── basic-00197-med.c │ │ │ │ ├── 901 │ │ │ │ │ └── basic-00197-min.c │ │ │ │ ├── 902 │ │ │ │ │ └── basic-00197-ok.c │ │ │ │ ├── 903 │ │ │ │ │ └── basic-00198-large.c │ │ │ │ ├── 904 │ │ │ │ │ └── basic-00198-med.c │ │ │ │ ├── 905 │ │ │ │ │ └── basic-00198-min.c │ │ │ │ ├── 906 │ │ │ │ │ └── basic-00198-ok.c │ │ │ │ ├── 907 │ │ │ │ │ └── basic-00199-large.c │ │ │ │ ├── 908 │ │ │ │ │ └── basic-00199-med.c │ │ │ │ ├── 909 │ │ │ │ │ └── basic-00199-min.c │ │ │ │ ├── 910 │ │ │ │ │ └── basic-00199-ok.c │ │ │ │ ├── 911 │ │ │ │ │ └── basic-00200-large.c │ │ │ │ ├── 912 │ │ │ │ │ └── basic-00200-med.c │ │ │ │ ├── 913 │ │ │ │ │ └── basic-00200-min.c │ │ │ │ ├── 914 │ │ │ │ │ └── basic-00200-ok.c │ │ │ │ ├── 915 │ │ │ │ │ └── basic-00201-large.c │ │ │ │ ├── 916 │ │ │ │ │ └── basic-00201-med.c │ │ │ │ ├── 917 │ │ │ │ │ └── basic-00201-min.c │ │ │ │ ├── 918 │ │ │ │ │ └── basic-00201-ok.c │ │ │ │ ├── 919 │ │ │ │ │ └── basic-00202-large.c │ │ │ │ ├── 920 │ │ │ │ │ └── basic-00202-med.c │ │ │ │ ├── 921 │ │ │ │ │ └── basic-00202-min.c │ │ │ │ ├── 922 │ │ │ │ │ └── basic-00202-ok.c │ │ │ │ ├── 923 │ │ │ │ │ └── basic-00203-large.c │ │ │ │ ├── 924 │ │ │ │ │ └── basic-00203-med.c │ │ │ │ ├── 925 │ │ │ │ │ └── basic-00203-min.c │ │ │ │ ├── 926 │ │ │ │ │ └── basic-00203-ok.c │ │ │ │ ├── 927 │ │ │ │ │ └── basic-00204-large.c │ │ │ │ ├── 928 │ │ │ │ │ └── basic-00204-med.c │ │ │ │ ├── 929 │ │ │ │ │ └── basic-00204-min.c │ │ │ │ ├── 930 │ │ │ │ │ └── basic-00204-ok.c │ │ │ │ ├── 931 │ │ │ │ │ └── basic-00205-large.c │ │ │ │ ├── 932 │ │ │ │ │ └── basic-00205-med.c │ │ │ │ ├── 933 │ │ │ │ │ └── basic-00205-min.c │ │ │ │ ├── 934 │ │ │ │ │ └── basic-00205-ok.c │ │ │ │ ├── 935 │ │ │ │ │ └── basic-00206-large.c │ │ │ │ ├── 936 │ │ │ │ │ └── basic-00206-med.c │ │ │ │ ├── 937 │ │ │ │ │ └── basic-00206-min.c │ │ │ │ ├── 938 │ │ │ │ │ └── basic-00206-ok.c │ │ │ │ ├── 939 │ │ │ │ │ └── basic-00207-large.c │ │ │ │ ├── 940 │ │ │ │ │ └── basic-00207-med.c │ │ │ │ ├── 941 │ │ │ │ │ └── basic-00207-min.c │ │ │ │ ├── 942 │ │ │ │ │ └── basic-00207-ok.c │ │ │ │ ├── 943 │ │ │ │ │ └── basic-00208-large.c │ │ │ │ ├── 944 │ │ │ │ │ └── basic-00208-med.c │ │ │ │ ├── 945 │ │ │ │ │ └── basic-00208-min.c │ │ │ │ ├── 946 │ │ │ │ │ └── basic-00208-ok.c │ │ │ │ ├── 947 │ │ │ │ │ └── basic-00209-large.c │ │ │ │ ├── 948 │ │ │ │ │ └── basic-00209-med.c │ │ │ │ ├── 949 │ │ │ │ │ └── basic-00209-min.c │ │ │ │ ├── 950 │ │ │ │ │ └── basic-00209-ok.c │ │ │ │ ├── 951 │ │ │ │ │ └── basic-00210-large.c │ │ │ │ ├── 952 │ │ │ │ │ └── basic-00210-med.c │ │ │ │ ├── 953 │ │ │ │ │ └── basic-00210-min.c │ │ │ │ ├── 954 │ │ │ │ │ └── basic-00210-ok.c │ │ │ │ ├── 955 │ │ │ │ │ └── basic-00211-large.c │ │ │ │ ├── 956 │ │ │ │ │ └── basic-00211-med.c │ │ │ │ ├── 957 │ │ │ │ │ └── basic-00211-min.c │ │ │ │ ├── 958 │ │ │ │ │ └── basic-00211-ok.c │ │ │ │ ├── 959 │ │ │ │ │ └── basic-00212-large.c │ │ │ │ ├── 960 │ │ │ │ │ └── basic-00212-med.c │ │ │ │ ├── 961 │ │ │ │ │ └── basic-00212-min.c │ │ │ │ ├── 962 │ │ │ │ │ └── basic-00212-ok.c │ │ │ │ ├── 963 │ │ │ │ │ └── basic-00213-large.c │ │ │ │ ├── 964 │ │ │ │ │ └── basic-00213-med.c │ │ │ │ ├── 965 │ │ │ │ │ └── basic-00213-min.c │ │ │ │ ├── 966 │ │ │ │ │ └── basic-00213-ok.c │ │ │ │ ├── 967 │ │ │ │ │ └── basic-00214-large.c │ │ │ │ ├── 968 │ │ │ │ │ └── basic-00214-med.c │ │ │ │ ├── 969 │ │ │ │ │ └── basic-00214-min.c │ │ │ │ ├── 970 │ │ │ │ │ └── basic-00214-ok.c │ │ │ │ ├── 971 │ │ │ │ │ └── basic-00215-large.c │ │ │ │ ├── 972 │ │ │ │ │ └── basic-00215-med.c │ │ │ │ ├── 973 │ │ │ │ │ └── basic-00215-min.c │ │ │ │ ├── 974 │ │ │ │ │ └── basic-00215-ok.c │ │ │ │ ├── 975 │ │ │ │ │ └── basic-00216-large.c │ │ │ │ ├── 976 │ │ │ │ │ └── basic-00216-med.c │ │ │ │ ├── 977 │ │ │ │ │ └── basic-00216-min.c │ │ │ │ ├── 978 │ │ │ │ │ └── basic-00216-ok.c │ │ │ │ ├── 979 │ │ │ │ │ └── basic-00217-large.c │ │ │ │ ├── 980 │ │ │ │ │ └── basic-00217-med.c │ │ │ │ ├── 981 │ │ │ │ │ └── basic-00217-min.c │ │ │ │ ├── 982 │ │ │ │ │ └── basic-00217-ok.c │ │ │ │ ├── 983 │ │ │ │ │ └── basic-00218-large.c │ │ │ │ ├── 984 │ │ │ │ │ └── basic-00218-med.c │ │ │ │ ├── 985 │ │ │ │ │ └── basic-00218-min.c │ │ │ │ ├── 986 │ │ │ │ │ └── basic-00218-ok.c │ │ │ │ ├── 987 │ │ │ │ │ └── basic-00219-large.c │ │ │ │ ├── 988 │ │ │ │ │ └── basic-00219-med.c │ │ │ │ ├── 989 │ │ │ │ │ └── basic-00219-min.c │ │ │ │ ├── 990 │ │ │ │ │ └── basic-00219-ok.c │ │ │ │ ├── 991 │ │ │ │ │ └── basic-00220-large.c │ │ │ │ ├── 992 │ │ │ │ │ └── basic-00220-med.c │ │ │ │ ├── 993 │ │ │ │ │ └── basic-00220-min.c │ │ │ │ ├── 994 │ │ │ │ │ └── basic-00220-ok.c │ │ │ │ ├── 995 │ │ │ │ │ └── basic-00221-large.c │ │ │ │ ├── 996 │ │ │ │ │ └── basic-00221-med.c │ │ │ │ ├── 997 │ │ │ │ │ └── basic-00221-min.c │ │ │ │ ├── 998 │ │ │ │ │ └── basic-00221-ok.c │ │ │ │ └── 999 │ │ │ │ │ └── basic-00222-large.c │ │ │ └── 001 │ │ │ │ ├── 100 │ │ │ │ └── basic-00247-med.c │ │ │ │ ├── 101 │ │ │ │ └── basic-00247-min.c │ │ │ │ ├── 102 │ │ │ │ └── basic-00247-ok.c │ │ │ │ ├── 103 │ │ │ │ └── basic-00248-large.c │ │ │ │ ├── 104 │ │ │ │ └── basic-00248-med.c │ │ │ │ ├── 105 │ │ │ │ └── basic-00248-min.c │ │ │ │ ├── 106 │ │ │ │ └── basic-00248-ok.c │ │ │ │ ├── 107 │ │ │ │ └── basic-00249-large.c │ │ │ │ ├── 108 │ │ │ │ └── basic-00249-med.c │ │ │ │ ├── 109 │ │ │ │ └── basic-00249-min.c │ │ │ │ ├── 110 │ │ │ │ └── basic-00249-ok.c │ │ │ │ ├── 111 │ │ │ │ └── basic-00250-large.c │ │ │ │ ├── 112 │ │ │ │ └── basic-00250-med.c │ │ │ │ ├── 113 │ │ │ │ └── basic-00250-min.c │ │ │ │ ├── 114 │ │ │ │ └── basic-00250-ok.c │ │ │ │ ├── 115 │ │ │ │ └── basic-00251-large.c │ │ │ │ ├── 116 │ │ │ │ └── basic-00251-med.c │ │ │ │ ├── 117 │ │ │ │ └── basic-00251-min.c │ │ │ │ ├── 118 │ │ │ │ └── basic-00251-ok.c │ │ │ │ ├── 119 │ │ │ │ └── basic-00252-large.c │ │ │ │ ├── 120 │ │ │ │ └── basic-00252-med.c │ │ │ │ ├── 121 │ │ │ │ └── basic-00252-min.c │ │ │ │ ├── 122 │ │ │ │ └── basic-00252-ok.c │ │ │ │ ├── 123 │ │ │ │ └── basic-00253-large.c │ │ │ │ ├── 124 │ │ │ │ └── basic-00253-med.c │ │ │ │ ├── 125 │ │ │ │ └── basic-00253-min.c │ │ │ │ ├── 126 │ │ │ │ └── basic-00253-ok.c │ │ │ │ ├── 127 │ │ │ │ └── basic-00254-large.c │ │ │ │ ├── 128 │ │ │ │ └── basic-00254-med.c │ │ │ │ ├── 129 │ │ │ │ └── basic-00254-min.c │ │ │ │ ├── 130 │ │ │ │ └── basic-00254-ok.c │ │ │ │ ├── 131 │ │ │ │ └── basic-00255-large.c │ │ │ │ ├── 132 │ │ │ │ └── basic-00255-med.c │ │ │ │ ├── 133 │ │ │ │ └── basic-00255-min.c │ │ │ │ ├── 134 │ │ │ │ └── basic-00255-ok.c │ │ │ │ ├── 135 │ │ │ │ └── basic-00256-large.c │ │ │ │ ├── 136 │ │ │ │ └── basic-00256-med.c │ │ │ │ ├── 137 │ │ │ │ └── basic-00256-min.c │ │ │ │ ├── 138 │ │ │ │ └── basic-00256-ok.c │ │ │ │ ├── 139 │ │ │ │ └── basic-00257-large.c │ │ │ │ ├── 140 │ │ │ │ └── basic-00257-med.c │ │ │ │ ├── 141 │ │ │ │ └── basic-00257-min.c │ │ │ │ ├── 142 │ │ │ │ └── basic-00257-ok.c │ │ │ │ ├── 143 │ │ │ │ └── basic-00258-large.c │ │ │ │ ├── 144 │ │ │ │ └── basic-00258-med.c │ │ │ │ ├── 145 │ │ │ │ └── basic-00258-min.c │ │ │ │ ├── 146 │ │ │ │ └── basic-00258-ok.c │ │ │ │ ├── 147 │ │ │ │ └── basic-00259-large.c │ │ │ │ ├── 148 │ │ │ │ └── basic-00259-med.c │ │ │ │ ├── 149 │ │ │ │ └── basic-00259-min.c │ │ │ │ ├── 150 │ │ │ │ └── basic-00259-ok.c │ │ │ │ ├── 151 │ │ │ │ └── basic-00260-large.c │ │ │ │ ├── 152 │ │ │ │ └── basic-00260-med.c │ │ │ │ ├── 153 │ │ │ │ └── basic-00260-min.c │ │ │ │ ├── 154 │ │ │ │ └── basic-00260-ok.c │ │ │ │ ├── 155 │ │ │ │ └── basic-00261-large.c │ │ │ │ ├── 156 │ │ │ │ └── basic-00261-med.c │ │ │ │ ├── 157 │ │ │ │ └── basic-00261-min.c │ │ │ │ ├── 158 │ │ │ │ └── basic-00261-ok.c │ │ │ │ ├── 159 │ │ │ │ └── basic-00262-large.c │ │ │ │ ├── 160 │ │ │ │ └── basic-00262-med.c │ │ │ │ ├── 161 │ │ │ │ └── basic-00262-min.c │ │ │ │ ├── 162 │ │ │ │ └── basic-00262-ok.c │ │ │ │ ├── 163 │ │ │ │ └── basic-00263-large.c │ │ │ │ ├── 164 │ │ │ │ └── basic-00263-med.c │ │ │ │ ├── 165 │ │ │ │ └── basic-00263-min.c │ │ │ │ ├── 166 │ │ │ │ └── basic-00263-ok.c │ │ │ │ ├── 167 │ │ │ │ └── basic-00264-large.c │ │ │ │ ├── 168 │ │ │ │ └── basic-00264-med.c │ │ │ │ ├── 169 │ │ │ │ └── basic-00264-min.c │ │ │ │ ├── 170 │ │ │ │ └── basic-00264-ok.c │ │ │ │ ├── 171 │ │ │ │ └── basic-00265-large.c │ │ │ │ ├── 172 │ │ │ │ └── basic-00265-med.c │ │ │ │ ├── 173 │ │ │ │ └── basic-00265-min.c │ │ │ │ ├── 174 │ │ │ │ └── basic-00265-ok.c │ │ │ │ ├── 175 │ │ │ │ └── basic-00266-large.c │ │ │ │ ├── 176 │ │ │ │ └── basic-00266-med.c │ │ │ │ ├── 177 │ │ │ │ └── basic-00266-min.c │ │ │ │ ├── 178 │ │ │ │ └── basic-00266-ok.c │ │ │ │ ├── 179 │ │ │ │ └── basic-00267-large.c │ │ │ │ ├── 180 │ │ │ │ └── basic-00267-med.c │ │ │ │ ├── 181 │ │ │ │ └── basic-00267-min.c │ │ │ │ ├── 182 │ │ │ │ └── basic-00267-ok.c │ │ │ │ ├── 183 │ │ │ │ └── basic-00268-large.c │ │ │ │ ├── 184 │ │ │ │ └── basic-00268-med.c │ │ │ │ ├── 185 │ │ │ │ └── basic-00268-min.c │ │ │ │ ├── 186 │ │ │ │ └── basic-00268-ok.c │ │ │ │ ├── 187 │ │ │ │ └── basic-00269-large.c │ │ │ │ ├── 188 │ │ │ │ └── basic-00269-med.c │ │ │ │ ├── 189 │ │ │ │ └── basic-00269-min.c │ │ │ │ ├── 190 │ │ │ │ └── basic-00269-ok.c │ │ │ │ ├── 191 │ │ │ │ └── basic-00270-large.c │ │ │ │ ├── 192 │ │ │ │ └── basic-00270-med.c │ │ │ │ ├── 193 │ │ │ │ └── basic-00270-min.c │ │ │ │ ├── 194 │ │ │ │ └── basic-00270-ok.c │ │ │ │ ├── 195 │ │ │ │ └── basic-00271-large.c │ │ │ │ ├── 196 │ │ │ │ └── basic-00271-med.c │ │ │ │ ├── 197 │ │ │ │ └── basic-00271-min.c │ │ │ │ ├── 198 │ │ │ │ └── basic-00271-ok.c │ │ │ │ ├── 199 │ │ │ │ └── basic-00272-large.c │ │ │ │ ├── 200 │ │ │ │ └── basic-00272-med.c │ │ │ │ ├── 201 │ │ │ │ └── basic-00272-min.c │ │ │ │ ├── 202 │ │ │ │ └── basic-00272-ok.c │ │ │ │ ├── 203 │ │ │ │ └── basic-00273-large.c │ │ │ │ ├── 204 │ │ │ │ └── basic-00273-med.c │ │ │ │ ├── 205 │ │ │ │ └── basic-00273-min.c │ │ │ │ ├── 206 │ │ │ │ └── basic-00273-ok.c │ │ │ │ ├── 207 │ │ │ │ └── basic-00274-large.c │ │ │ │ ├── 208 │ │ │ │ └── basic-00274-med.c │ │ │ │ ├── 209 │ │ │ │ └── basic-00274-min.c │ │ │ │ ├── 210 │ │ │ │ └── basic-00274-ok.c │ │ │ │ ├── 211 │ │ │ │ └── basic-00275-large.c │ │ │ │ ├── 212 │ │ │ │ └── basic-00275-med.c │ │ │ │ ├── 213 │ │ │ │ └── basic-00275-min.c │ │ │ │ ├── 214 │ │ │ │ └── basic-00275-ok.c │ │ │ │ ├── 215 │ │ │ │ └── basic-00276-large.c │ │ │ │ ├── 216 │ │ │ │ └── basic-00276-med.c │ │ │ │ ├── 217 │ │ │ │ └── basic-00276-min.c │ │ │ │ ├── 218 │ │ │ │ └── basic-00276-ok.c │ │ │ │ ├── 219 │ │ │ │ └── basic-00277-large.c │ │ │ │ ├── 220 │ │ │ │ └── basic-00277-med.c │ │ │ │ ├── 221 │ │ │ │ └── basic-00277-min.c │ │ │ │ ├── 222 │ │ │ │ └── basic-00277-ok.c │ │ │ │ ├── 223 │ │ │ │ └── basic-00278-large.c │ │ │ │ ├── 224 │ │ │ │ └── basic-00278-med.c │ │ │ │ ├── 225 │ │ │ │ └── basic-00278-min.c │ │ │ │ ├── 226 │ │ │ │ └── basic-00278-ok.c │ │ │ │ ├── 227 │ │ │ │ └── basic-00279-large.c │ │ │ │ ├── 228 │ │ │ │ └── basic-00279-med.c │ │ │ │ ├── 229 │ │ │ │ └── basic-00279-min.c │ │ │ │ ├── 230 │ │ │ │ └── basic-00279-ok.c │ │ │ │ ├── 231 │ │ │ │ └── basic-00280-large.c │ │ │ │ ├── 232 │ │ │ │ └── basic-00280-med.c │ │ │ │ ├── 233 │ │ │ │ └── basic-00280-min.c │ │ │ │ ├── 234 │ │ │ │ └── basic-00280-ok.c │ │ │ │ ├── 235 │ │ │ │ └── basic-00281-large.c │ │ │ │ ├── 236 │ │ │ │ └── basic-00281-med.c │ │ │ │ ├── 237 │ │ │ │ └── basic-00281-min.c │ │ │ │ ├── 238 │ │ │ │ └── basic-00281-ok.c │ │ │ │ ├── 239 │ │ │ │ └── basic-00282-large.c │ │ │ │ ├── 240 │ │ │ │ └── basic-00282-med.c │ │ │ │ ├── 241 │ │ │ │ └── basic-00282-min.c │ │ │ │ ├── 242 │ │ │ │ └── basic-00282-ok.c │ │ │ │ ├── 243 │ │ │ │ └── basic-00283-large.c │ │ │ │ ├── 244 │ │ │ │ └── basic-00283-med.c │ │ │ │ ├── 245 │ │ │ │ └── basic-00283-min.c │ │ │ │ ├── 246 │ │ │ │ └── basic-00283-ok.c │ │ │ │ ├── 247 │ │ │ │ └── basic-00284-large.c │ │ │ │ ├── 248 │ │ │ │ └── basic-00284-med.c │ │ │ │ ├── 249 │ │ │ │ └── basic-00284-min.c │ │ │ │ ├── 250 │ │ │ │ └── basic-00284-ok.c │ │ │ │ ├── 251 │ │ │ │ └── basic-00285-large.c │ │ │ │ ├── 252 │ │ │ │ └── basic-00285-med.c │ │ │ │ ├── 253 │ │ │ │ └── basic-00285-min.c │ │ │ │ ├── 254 │ │ │ │ └── basic-00285-ok.c │ │ │ │ ├── 255 │ │ │ │ └── basic-00286-large.c │ │ │ │ ├── 256 │ │ │ │ └── basic-00286-med.c │ │ │ │ ├── 257 │ │ │ │ └── basic-00286-min.c │ │ │ │ ├── 258 │ │ │ │ └── basic-00286-ok.c │ │ │ │ ├── 259 │ │ │ │ └── basic-00287-large.c │ │ │ │ ├── 260 │ │ │ │ └── basic-00287-med.c │ │ │ │ ├── 261 │ │ │ │ └── basic-00287-min.c │ │ │ │ ├── 262 │ │ │ │ └── basic-00287-ok.c │ │ │ │ ├── 263 │ │ │ │ └── basic-00288-large.c │ │ │ │ ├── 264 │ │ │ │ └── basic-00288-med.c │ │ │ │ ├── 265 │ │ │ │ └── basic-00288-min.c │ │ │ │ ├── 266 │ │ │ │ └── basic-00288-ok.c │ │ │ │ ├── 267 │ │ │ │ └── basic-00289-large.c │ │ │ │ ├── 268 │ │ │ │ └── basic-00289-med.c │ │ │ │ ├── 269 │ │ │ │ └── basic-00289-min.c │ │ │ │ ├── 270 │ │ │ │ └── basic-00289-ok.c │ │ │ │ ├── 271 │ │ │ │ └── basic-00290-large.c │ │ │ │ ├── 272 │ │ │ │ └── basic-00290-med.c │ │ │ │ ├── 273 │ │ │ │ └── basic-00290-min.c │ │ │ │ ├── 274 │ │ │ │ └── basic-00290-ok.c │ │ │ │ ├── 275 │ │ │ │ └── basic-00291-large.c │ │ │ │ ├── 276 │ │ │ │ └── basic-00291-med.c │ │ │ │ ├── 277 │ │ │ │ └── basic-00291-min.c │ │ │ │ ├── 278 │ │ │ │ └── basic-00291-ok.c │ │ │ │ ├── 000 │ │ │ │ └── basic-00222-med.c │ │ │ │ ├── 001 │ │ │ │ └── basic-00222-min.c │ │ │ │ ├── 002 │ │ │ │ └── basic-00222-ok.c │ │ │ │ ├── 003 │ │ │ │ └── basic-00223-large.c │ │ │ │ ├── 004 │ │ │ │ └── basic-00223-med.c │ │ │ │ ├── 005 │ │ │ │ └── basic-00223-min.c │ │ │ │ ├── 006 │ │ │ │ └── basic-00223-ok.c │ │ │ │ ├── 007 │ │ │ │ └── basic-00224-large.c │ │ │ │ ├── 008 │ │ │ │ └── basic-00224-med.c │ │ │ │ ├── 009 │ │ │ │ └── basic-00224-min.c │ │ │ │ ├── 010 │ │ │ │ └── basic-00224-ok.c │ │ │ │ ├── 011 │ │ │ │ └── basic-00225-large.c │ │ │ │ ├── 012 │ │ │ │ └── basic-00225-med.c │ │ │ │ ├── 013 │ │ │ │ └── basic-00225-min.c │ │ │ │ ├── 014 │ │ │ │ └── basic-00225-ok.c │ │ │ │ ├── 015 │ │ │ │ └── basic-00226-large.c │ │ │ │ ├── 016 │ │ │ │ └── basic-00226-med.c │ │ │ │ ├── 017 │ │ │ │ └── basic-00226-min.c │ │ │ │ ├── 018 │ │ │ │ └── basic-00226-ok.c │ │ │ │ ├── 019 │ │ │ │ └── basic-00227-large.c │ │ │ │ ├── 020 │ │ │ │ └── basic-00227-med.c │ │ │ │ ├── 021 │ │ │ │ └── basic-00227-min.c │ │ │ │ ├── 022 │ │ │ │ └── basic-00227-ok.c │ │ │ │ ├── 023 │ │ │ │ └── basic-00228-large.c │ │ │ │ ├── 024 │ │ │ │ └── basic-00228-med.c │ │ │ │ ├── 025 │ │ │ │ └── basic-00228-min.c │ │ │ │ ├── 026 │ │ │ │ └── basic-00228-ok.c │ │ │ │ ├── 027 │ │ │ │ └── basic-00229-large.c │ │ │ │ ├── 028 │ │ │ │ └── basic-00229-med.c │ │ │ │ ├── 029 │ │ │ │ └── basic-00229-min.c │ │ │ │ ├── 030 │ │ │ │ └── basic-00229-ok.c │ │ │ │ ├── 031 │ │ │ │ └── basic-00230-large.c │ │ │ │ ├── 032 │ │ │ │ └── basic-00230-med.c │ │ │ │ ├── 033 │ │ │ │ └── basic-00230-min.c │ │ │ │ ├── 034 │ │ │ │ └── basic-00230-ok.c │ │ │ │ ├── 035 │ │ │ │ └── basic-00231-large.c │ │ │ │ ├── 036 │ │ │ │ └── basic-00231-med.c │ │ │ │ ├── 037 │ │ │ │ └── basic-00231-min.c │ │ │ │ ├── 038 │ │ │ │ └── basic-00231-ok.c │ │ │ │ ├── 039 │ │ │ │ └── basic-00232-large.c │ │ │ │ ├── 040 │ │ │ │ └── basic-00232-med.c │ │ │ │ ├── 041 │ │ │ │ └── basic-00232-min.c │ │ │ │ ├── 042 │ │ │ │ └── basic-00232-ok.c │ │ │ │ ├── 043 │ │ │ │ └── basic-00233-large.c │ │ │ │ ├── 044 │ │ │ │ └── basic-00233-med.c │ │ │ │ ├── 045 │ │ │ │ └── basic-00233-min.c │ │ │ │ ├── 046 │ │ │ │ └── basic-00233-ok.c │ │ │ │ ├── 047 │ │ │ │ └── basic-00234-large.c │ │ │ │ ├── 048 │ │ │ │ └── basic-00234-med.c │ │ │ │ ├── 049 │ │ │ │ └── basic-00234-min.c │ │ │ │ ├── 050 │ │ │ │ └── basic-00234-ok.c │ │ │ │ ├── 051 │ │ │ │ └── basic-00235-large.c │ │ │ │ ├── 052 │ │ │ │ └── basic-00235-med.c │ │ │ │ ├── 053 │ │ │ │ └── basic-00235-min.c │ │ │ │ ├── 054 │ │ │ │ └── basic-00235-ok.c │ │ │ │ ├── 055 │ │ │ │ └── basic-00236-large.c │ │ │ │ ├── 056 │ │ │ │ └── basic-00236-med.c │ │ │ │ ├── 057 │ │ │ │ └── basic-00236-min.c │ │ │ │ ├── 058 │ │ │ │ └── basic-00236-ok.c │ │ │ │ ├── 059 │ │ │ │ └── basic-00237-large.c │ │ │ │ ├── 060 │ │ │ │ └── basic-00237-med.c │ │ │ │ ├── 061 │ │ │ │ └── basic-00237-min.c │ │ │ │ ├── 062 │ │ │ │ └── basic-00237-ok.c │ │ │ │ ├── 063 │ │ │ │ └── basic-00238-large.c │ │ │ │ ├── 064 │ │ │ │ └── basic-00238-med.c │ │ │ │ ├── 065 │ │ │ │ └── basic-00238-min.c │ │ │ │ ├── 066 │ │ │ │ └── basic-00238-ok.c │ │ │ │ ├── 067 │ │ │ │ └── basic-00239-large.c │ │ │ │ ├── 068 │ │ │ │ └── basic-00239-med.c │ │ │ │ ├── 069 │ │ │ │ └── basic-00239-min.c │ │ │ │ ├── 070 │ │ │ │ └── basic-00239-ok.c │ │ │ │ ├── 071 │ │ │ │ └── basic-00240-large.c │ │ │ │ ├── 072 │ │ │ │ └── basic-00240-med.c │ │ │ │ ├── 073 │ │ │ │ └── basic-00240-min.c │ │ │ │ ├── 074 │ │ │ │ └── basic-00240-ok.c │ │ │ │ ├── 075 │ │ │ │ └── basic-00241-large.c │ │ │ │ ├── 076 │ │ │ │ └── basic-00241-med.c │ │ │ │ ├── 077 │ │ │ │ └── basic-00241-min.c │ │ │ │ ├── 078 │ │ │ │ └── basic-00241-ok.c │ │ │ │ ├── 079 │ │ │ │ └── basic-00242-large.c │ │ │ │ ├── 080 │ │ │ │ └── basic-00242-med.c │ │ │ │ ├── 081 │ │ │ │ └── basic-00242-min.c │ │ │ │ ├── 082 │ │ │ │ └── basic-00242-ok.c │ │ │ │ ├── 083 │ │ │ │ └── basic-00243-large.c │ │ │ │ ├── 084 │ │ │ │ └── basic-00243-med.c │ │ │ │ ├── 085 │ │ │ │ └── basic-00243-min.c │ │ │ │ ├── 086 │ │ │ │ └── basic-00243-ok.c │ │ │ │ ├── 087 │ │ │ │ └── basic-00244-large.c │ │ │ │ ├── 088 │ │ │ │ └── basic-00244-med.c │ │ │ │ ├── 089 │ │ │ │ └── basic-00244-min.c │ │ │ │ ├── 090 │ │ │ │ └── basic-00244-ok.c │ │ │ │ ├── 091 │ │ │ │ └── basic-00245-large.c │ │ │ │ ├── 092 │ │ │ │ └── basic-00245-med.c │ │ │ │ ├── 093 │ │ │ │ └── basic-00245-min.c │ │ │ │ ├── 094 │ │ │ │ └── basic-00245-ok.c │ │ │ │ ├── 095 │ │ │ │ └── basic-00246-large.c │ │ │ │ ├── 096 │ │ │ │ └── basic-00246-med.c │ │ │ │ ├── 097 │ │ │ │ └── basic-00246-min.c │ │ │ │ ├── 098 │ │ │ │ └── basic-00246-ok.c │ │ │ │ └── 099 │ │ │ │ └── basic-00247-large.c │ │ ├── Makefile │ │ └── manifest-89-2Ekjh3.xml │ ├── src_makefiles │ │ └── Makefile │ └── valgrind │ │ └── Makefile ├── get_table_memsafe.sh ├── get_table_movec-memsafe.sh ├── grep_reported_errors.addresssanitizer.sh ├── grep_reported_errors.movec-memsafe.sh ├── grep_reported_errors.softboundcets.sh ├── grep_reported_errors.valgrind.sh ├── grep_time_mem.sh └── msbench │ ├── addresssanitizer │ └── Makefile │ ├── movec-memsafe │ └── Makefile │ ├── softboundcets │ └── Makefile │ ├── src │ ├── Makefile │ ├── all-mem-err │ │ ├── 1_mp-ok.c │ │ ├── 1_mp.c │ │ ├── 1_np.c │ │ ├── 1_up.c │ │ ├── 1_up.w.c │ │ ├── 2_long_overflow.w.c │ │ ├── 2_o_g.w.c │ │ ├── 2_so_sk.w.c │ │ ├── 3_temporal_df.c │ │ ├── 3_temporal_uaf_h.c │ │ ├── 3_temporal_uaf_quarantine.c │ │ ├── 3_temporal_uaf_sk.w.c │ │ ├── 4_ml.c │ │ ├── 5_segment_id_1.c │ │ ├── 5_segment_id_1.w.c │ │ ├── 5_segment_id_1_2.c │ │ ├── 5_segment_id_2.c │ │ ├── 5_segment_id_exploit.c │ │ ├── 5_segment_if_1.c │ │ ├── 5_segment_if_2.c │ │ ├── s3_wf_stdlib_free.c │ │ ├── s3_wf_stdlib_malloc.c │ │ ├── s3_wf_string.c │ │ ├── s3_wfv_stdio_printf_1.c │ │ ├── s3_wfv_stdio_printf_2.c │ │ └── s3_wfv_stdio_sscanf.c │ ├── c-syntax │ │ ├── 2_ph_vh.c │ │ ├── 2_psk_3_func_call.c │ │ ├── 2_psk_4_va_arg_call-ok.c │ │ ├── 2_psk_4_va_arg_call.c │ │ ├── 2_psk_5_cond_expr.c │ │ ├── 2_psk_cai_1.c │ │ ├── 2_psk_cai_2.c │ │ ├── 2_psk_cai_s.c │ │ ├── 2_psk_cf.c │ │ ├── 2_psk_cp-ok.c │ │ ├── 2_psk_cp.c │ │ ├── 2_psk_cs.c │ │ ├── 2_psk_vg.c │ │ ├── 2_psk_vg.w.c │ │ ├── 2_psk_vh.c │ │ ├── 2_psk_vsk.c │ │ ├── 2_psk_vsk.w.c │ │ ├── 2_psk_vst.c │ │ ├── 3_def_a_1p_1.c │ │ ├── 3_def_a_1p_2.c │ │ ├── 3_def_a_2s.c │ │ ├── 3_def_a_3fc_p.c │ │ ├── 3_def_a_3fc_s.c │ │ ├── 3_def_a_7r.c │ │ ├── 3_def_a_8gp-ok.c │ │ ├── 3_def_a_8gp.c │ │ ├── 3_def_a_9gs-ok.c │ │ ├── 3_def_a_9gs.c │ │ ├── 3_def_a_9gs_2-ok.c │ │ ├── 3_def_a_9gs_2.c │ │ ├── 4_deref_3fc.c │ │ ├── 4_deref_4va.c │ │ ├── 4_member_1v.c │ │ ├── 4_member_2c.c │ │ ├── 4_member_3fc.c │ │ ├── 4_member_4va.c │ │ ├── 4_member_5ce.c │ │ ├── 4_member_6se.c │ │ ├── 4_member_7r.c │ │ ├── 4_subscript_1v.c │ │ ├── 4_subscript_2c.c │ │ ├── 4_subscript_3fc.c │ │ ├── 4_subscript_3fpc.c │ │ ├── 4_subscript_4va.c │ │ ├── 4_subscript_5ce.c │ │ ├── 4_subscript_6se.c │ │ ├── 4_subscript_7r.c │ │ ├── 5_fc_p_4va.c │ │ ├── 5_fc_s_1v.c │ │ ├── 5_fc_s_3fc.c │ │ ├── 5_fc_s_3fpc.c │ │ ├── 5_fc_s_4va.c │ │ ├── 5_fc_s_5ce.c │ │ ├── 5_fc_s_7r.c │ │ ├── 5_fc_v_p_1v-ok.c │ │ ├── 5_fc_v_p_1v.c │ │ ├── 5_fc_v_p_2c.c │ │ ├── 5_fc_v_p_3fc.c │ │ ├── 5_fc_v_p_7r.c │ │ ├── 5_fpc_p_s_1v.c │ │ ├── 5_fpc_p_s_3fc.c │ │ ├── 5_fpc_p_s_4va.c │ │ ├── 5_fpc_p_s_5ce.c │ │ └── 5_fpc_p_s_7r.c │ └── nptrs │ │ ├── 11_psk_vg-ok.c │ │ ├── 11_psk_vg.c │ │ ├── 11_psk_vg.w.c │ │ ├── 11_psk_vh-ok.c │ │ ├── 11_psk_vh.c │ │ ├── 11_psk_vh.w.c │ │ ├── 11_psk_vsk-ok.c │ │ ├── 11_psk_vsk.c │ │ ├── 11_psk_vsk.w.c │ │ ├── 11_psk_vst-ok.c │ │ ├── 11_psk_vst.c │ │ ├── 11_psk_vst.w.c │ │ ├── 1n_psk_vh-ok.c │ │ ├── 1n_psk_vh.c │ │ ├── 1n_psk_vh.w.c │ │ ├── 1n_psk_vsk-ok.c │ │ ├── 1n_psk_vsk.c │ │ ├── 1n_psk_vsk.w.c │ │ ├── n1_ph_vg-ok.c │ │ ├── n1_ph_vg.c │ │ ├── n1_ph_vg.w.c │ │ ├── n1_ph_vh-ok.c │ │ ├── n1_ph_vh.c │ │ ├── n1_ph_vh.w.c │ │ ├── n1_ph_vsk-ok.c │ │ ├── n1_ph_vsk.c │ │ ├── n1_ph_vsk.w.c │ │ ├── n1_ph_vst-ok.c │ │ ├── n1_ph_vst.c │ │ ├── n1_ph_vst.w.c │ │ ├── nn_ph_vh-ok.c │ │ ├── nn_ph_vh.c │ │ ├── nn_ph_vh.w.c │ │ ├── nn_ph_vsk-ok.c │ │ ├── nn_ph_vsk.c │ │ └── nn_ph_vsk.w.c │ ├── src_makefiles │ └── Makefile │ └── valgrind │ └── Makefile ├── benchmarks-nptrs ├── COMPILE ├── Makefile ├── Makefile.default ├── Makefile.inc.addresssanitizer ├── Makefile.inc.movec-memsafe ├── Makefile.inc.softboundcets ├── Makefile.inc.valgrind ├── addresssanitizer │ └── Makefile ├── get_table_memsafe.sh ├── get_table_movec-memsafe.sh ├── grep_reported_errors.addresssanitizer.sh ├── grep_reported_errors.movec-memsafe.sh ├── grep_reported_errors.softboundcets.sh ├── grep_reported_errors.valgrind.sh ├── grep_time_mem.sh ├── movec-memsafe │ └── Makefile ├── softboundcets │ └── Makefile ├── src │ ├── 11_psk_vg-ok.c │ ├── 11_psk_vg.c │ ├── 11_psk_vg.w.c │ ├── 11_psk_vh-ok.c │ ├── 11_psk_vh.c │ ├── 11_psk_vh.w.c │ ├── 11_psk_vsk-ok.c │ ├── 11_psk_vsk.c │ ├── 11_psk_vsk.w.c │ ├── 11_psk_vst-ok.c │ ├── 11_psk_vst.c │ ├── 11_psk_vst.w.c │ ├── 1n_psk_vh-ok.c │ ├── 1n_psk_vh.c │ ├── 1n_psk_vh.w.c │ ├── 1n_psk_vsk-ok.c │ ├── 1n_psk_vsk.c │ ├── 1n_psk_vsk.w.c │ ├── Makefile │ ├── n1_ph_vg-ok.c │ ├── n1_ph_vg.c │ ├── n1_ph_vg.w.c │ ├── n1_ph_vh-ok.c │ ├── n1_ph_vh.c │ ├── n1_ph_vh.w.c │ ├── n1_ph_vsk-ok.c │ ├── n1_ph_vsk.c │ ├── n1_ph_vsk.w.c │ ├── n1_ph_vst-ok.c │ ├── n1_ph_vst.c │ ├── n1_ph_vst.w.c │ ├── nn_ph_vh-ok.c │ ├── nn_ph_vh.c │ ├── nn_ph_vh.w.c │ ├── nn_ph_vsk-ok.c │ ├── nn_ph_vsk.c │ └── nn_ph_vsk.w.c └── valgrind │ └── Makefile ├── bin └── movec └── examples ├── advice-call-multi-files ├── Makefile ├── aspect.mon ├── func.c ├── header.h └── main.c ├── advice-call ├── aspect.mon └── main.c ├── advice-get ├── aspect.mon └── main.c ├── multi-files ├── Makefile ├── foo.c ├── func.c ├── header.h └── main.c ├── segment.c └── subobject.c /Dockerfile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This file is used to build a Docker image for artifact evaluation. 3 | # Please install Docker and then build the image in this directory: 4 | # $ sudo docker build -t movec:latest . 5 | # When the image is built, you can run it: 6 | # $ sudo docker run -it -v [a-host-directory]:/home/export movec 7 | # Note that you need to specify a host directory to export data (using -v). 8 | # The artifact and generated data are at /home/artifact in the container. 9 | # You may copy the generated data to /home/export in the container, and then 10 | # you can review the data at the host directory on your host system. 11 | ################################################################################ 12 | 13 | # Build on Ubuntu 14 | FROM ubuntu:22.04 15 | MAINTAINER Anonymous 16 | 17 | # Install software 18 | RUN apt-get update && \ 19 | apt-get install -y time && \ 20 | apt-get install -y gcc g++ make && \ 21 | apt-get install -y libncurses5-dev && \ 22 | apt-get install -y bear 23 | 24 | # Copy files 25 | ENV ARTIFACT_HOME /home/artifact 26 | ENV PATH $ARTIFACT_HOME/bin:$PATH 27 | ADD benchmarks-memsafe $ARTIFACT_HOME/benchmarks-memsafe 28 | ADD bin $ARTIFACT_HOME/bin 29 | ADD examples $ARTIFACT_HOME/examples 30 | ADD LICENSE.txt README.md $ARTIFACT_HOME 31 | WORKDIR $ARTIFACT_HOME 32 | 33 | # Set environment 34 | CMD /bin/bash 35 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | THE MOVEC PROJECT - License 2 | ================================================================================ 3 | 4 | Copyright (C) Zhe Chen. 5 | All rights reserved. 6 | 7 | * Redistribution and use for non-commercial purposes, e.g., teaching and 8 | research in colleges, universities and institutes, are free. 9 | 10 | * Redistribution of this artifact must retain the above copyright notice, 11 | this list of conditions and the following disclaimers. 12 | 13 | * Any commercial use must get a license from the author. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/Makefile: -------------------------------------------------------------------------------- 1 | # You can use one of the two following ways to init DIRS. 2 | # 1. Search for all sub-directories. 3 | DIRS := $(sort $(shell ls -d */)) 4 | # 2. Designate a set of sub-directories. 5 | # DIRS := msbench/ SARD-testsuite-81/ 6 | 7 | BUILDS := $(patsubst %/, %/build, $(DIRS)) 8 | RUNS := $(patsubst %/, %/run, $(DIRS)) 9 | CLEANS := $(patsubst %/, %/clean, $(DIRS)) 10 | 11 | .PHONY: build $(BUILDS) run $(RUNS) clean $(CLEANS) 12 | 13 | build: $(BUILDS) 14 | 15 | $(BUILDS): %/build: %/src 16 | @$(MAKE) -C $< 17 | 18 | run: $(RUNS) 19 | 20 | $(RUNS): %/run: %/src %/build 21 | @echo "Running" $(patsubst %/run, %, $@) 22 | @$(MAKE) -C $< run 23 | 24 | clean: $(CLEANS) 25 | 26 | $(CLEANS): %/clean: %/src 27 | @$(MAKE) -C $< clean 28 | 29 | -include Makefile.inc.movec-memsafe 30 | 31 | -include Makefile.inc.addresssanitizer 32 | 33 | -include Makefile.inc.softboundcets 34 | 35 | -include Makefile.inc.valgrind 36 | -------------------------------------------------------------------------------- /benchmarks-memsafe/Makefile.inc.addresssanitizer: -------------------------------------------------------------------------------- 1 | DIRS-addresssanitizer := $(sort $(patsubst ./%/addresssanitizer,%/,$(shell find . -name addresssanitizer))) 2 | 3 | OUTPUTS-addresssanitizer := $(patsubst %/, %/output-addresssanitizer, $(DIRS-addresssanitizer)) 4 | RUNS-addresssanitizer := $(patsubst %/, %/run-addresssanitizer, $(DIRS-addresssanitizer)) 5 | CLEANS-addresssanitizer := $(patsubst %/, %/clean-addresssanitizer, $(DIRS-addresssanitizer)) 6 | 7 | .PHONY: output-addresssanitizer run-addresssanitizer $(RUNS-addresssanitizer) clean-addresssanitizer $(CLEANS-addresssanitizer) 8 | 9 | ifneq ($(REOUTPUT),) 10 | .PHONY: $(OUTPUTS-addresssanitizer) 11 | endif 12 | 13 | output-addresssanitizer: $(OUTPUTS-addresssanitizer) 14 | 15 | $(OUTPUTS-addresssanitizer): %/output-addresssanitizer: %/addresssanitizer 16 | @$(MAKE) -C $< 17 | 18 | run-addresssanitizer: $(RUNS-addresssanitizer) 19 | 20 | $(RUNS-addresssanitizer): %/run-addresssanitizer: %/output-addresssanitizer 21 | @echo "Running" $(patsubst %/run-addresssanitizer, %, $@) 22 | @$(MAKE) -C $(patsubst %/run-addresssanitizer, %/addresssanitizer, $@) run --no-print-directory 23 | 24 | clean-addresssanitizer: $(CLEANS-addresssanitizer) 25 | 26 | $(CLEANS-addresssanitizer): %/clean-addresssanitizer: %/addresssanitizer 27 | @$(MAKE) -C $< clean 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/Makefile.inc.movec-memsafe: -------------------------------------------------------------------------------- 1 | DIRS-movec-memsafe := $(sort $(patsubst ./%/movec-memsafe,%/,$(shell find . -name movec-memsafe))) 2 | 3 | OUTPUTS-movec-memsafe := $(patsubst %/, %/output-movec-memsafe, $(DIRS-movec-memsafe)) 4 | RUNS-movec-memsafe := $(patsubst %/, %/run-movec-memsafe, $(DIRS-movec-memsafe)) 5 | CLEANS-movec-memsafe := $(patsubst %/, %/clean-movec-memsafe, $(DIRS-movec-memsafe)) 6 | 7 | .PHONY: output-movec-memsafe run-movec-memsafe $(RUNS-movec-memsafe) clean-movec-memsafe $(CLEANS-movec-memsafe) 8 | 9 | ifneq ($(REOUTPUT),) 10 | .PHONY: $(OUTPUTS-movec-memsafe) 11 | endif 12 | 13 | output-movec-memsafe: $(OUTPUTS-movec-memsafe) 14 | 15 | $(OUTPUTS-movec-memsafe): %/output-movec-memsafe: %/movec-memsafe 16 | @$(MAKE) -C $< 17 | 18 | run-movec-memsafe: $(RUNS-movec-memsafe) 19 | 20 | $(RUNS-movec-memsafe): %/run-movec-memsafe: %/output-movec-memsafe 21 | @echo "Running" $(patsubst %/run-movec-memsafe, %, $@) 22 | @$(MAKE) -C $(patsubst %/run-movec-memsafe, %/movec-memsafe, $@) run --no-print-directory 23 | 24 | clean-movec-memsafe: $(CLEANS-movec-memsafe) 25 | 26 | $(CLEANS-movec-memsafe): %/clean-movec-memsafe: %/movec-memsafe 27 | @$(MAKE) -C $< clean 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/Makefile.inc.softboundcets: -------------------------------------------------------------------------------- 1 | DIRS-softboundcets := $(sort $(patsubst ./%/softboundcets,%/,$(shell find . -name softboundcets))) 2 | 3 | OUTPUTS-softboundcets := $(patsubst %/, %/output-softboundcets, $(DIRS-softboundcets)) 4 | RUNS-softboundcets := $(patsubst %/, %/run-softboundcets, $(DIRS-softboundcets)) 5 | CLEANS-softboundcets := $(patsubst %/, %/clean-softboundcets, $(DIRS-softboundcets)) 6 | 7 | .PHONY: output-softboundcets run-softboundcets $(RUNS-softboundcets) clean-softboundcets $(CLEANS-softboundcets) 8 | 9 | ifneq ($(REOUTPUT),) 10 | .PHONY: $(OUTPUTS-softboundcets) 11 | endif 12 | 13 | output-softboundcets: $(OUTPUTS-softboundcets) 14 | 15 | $(OUTPUTS-softboundcets): %/output-softboundcets: %/softboundcets 16 | @$(MAKE) -C $< 17 | 18 | run-softboundcets: $(RUNS-softboundcets) 19 | 20 | $(RUNS-softboundcets): %/run-softboundcets: %/output-softboundcets 21 | @echo "Running" $(patsubst %/run-softboundcets, %, $@) 22 | @$(MAKE) -C $(patsubst %/run-softboundcets, %/softboundcets, $@) run --no-print-directory 23 | 24 | clean-softboundcets: $(CLEANS-softboundcets) 25 | 26 | $(CLEANS-softboundcets): %/clean-softboundcets: %/softboundcets 27 | @$(MAKE) -C $< clean 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/Makefile.inc.valgrind: -------------------------------------------------------------------------------- 1 | DIRS-valgrind := $(sort $(patsubst ./%/valgrind,%/,$(shell find . -name valgrind))) 2 | 3 | OUTPUTS-valgrind := $(patsubst %/, %/output-valgrind, $(DIRS-valgrind)) 4 | RUNS-valgrind := $(patsubst %/, %/run-valgrind, $(DIRS-valgrind)) 5 | CLEANS-valgrind := $(patsubst %/, %/clean-valgrind, $(DIRS-valgrind)) 6 | 7 | .PHONY: output-valgrind run-valgrind $(RUNS-valgrind) clean-valgrind $(CLEANS-valgrind) 8 | 9 | ifneq ($(REOUTPUT),) 10 | .PHONY: $(OUTPUTS-valgrind) 11 | endif 12 | 13 | output-valgrind: $(OUTPUTS-valgrind) 14 | 15 | $(OUTPUTS-valgrind): %/output-valgrind: %/valgrind 16 | @$(MAKE) -C $< 17 | 18 | run-valgrind: $(RUNS-valgrind) 19 | 20 | $(RUNS-valgrind): %/run-valgrind: %/output-valgrind 21 | @echo "Running" $(patsubst %/run-valgrind, %, $@) 22 | @$(MAKE) -C $(patsubst %/run-valgrind, %/valgrind, $@) run --no-print-directory 23 | 24 | clean-valgrind: $(CLEANS-valgrind) 25 | 26 | $(CLEANS-valgrind): %/clean-valgrind: %/valgrind 27 | @$(MAKE) -C $< clean 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := addresssanitizer 2 | INSTRU_CC = $(ASAN) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/src/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/movec-memsafe/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := movec-memsafe 2 | INSTRU_CC_OPTS := -D_RV_NORANDOM 3 | SOURCES := $(sort $(wildcard ../src/src/*.c)) 4 | SOURCES_WITH_ERROR := $(patsubst ../src/%.c, %.c, $(SOURCES)) 5 | 6 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, $(SOURCES)) 7 | 8 | include ../../Makefile.default 9 | 10 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c 11 | @echo "Instrumenting" $< 12 | $(MOVEC) --line-filename -c $< -o $@.c 13 | @echo "Building" $@ 14 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $@.c -o $@ 15 | 16 | # Additional scripts for comparing with the expected outputs. 17 | SOURCES_NO_DIFF := NONE.c 18 | DIFFS := $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.diff, $(SOURCES)) 19 | 20 | .PHONY: diff $(DIFFS) 21 | # Ignore the runs that will cause errors. 22 | .IGNORE: $(patsubst %.c, $(OUTPUT_DIR)/%.diff, $(SOURCES_NO_DIFF)) 23 | 24 | diff: $(DIFFS) 25 | @echo "***Successfully compared all outputs." 26 | 27 | $(DIFFS): $(OUTPUT_DIR)/%.diff: $(OUTPUT_DIR)/%.output.txt expected_outputs/%.output.txt $(OUTPUT_DIR)/%.error.txt expected_outputs/%.error.txt 28 | @echo "Comparing" $(word 1, $^) $(word 2, $^) 29 | @diff $(word 1, $^) $(word 2, $^) 30 | @diff $(word 3, $^) $(word 4, $^) 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := softboundcets 2 | INSTRU_CC = $(SOCETS) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/src/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/src/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES := $(sort $(wildcard src/*.c)) 2 | SOURCES_WITH_ERROR := \ 3 | src/basic-00045-min.c \ 4 | src/basic-00182-min.c 5 | 6 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 7 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 8 | PROGS := $(patsubst %.c, %, $(SOURCES)) 9 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 10 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 11 | 12 | .PHONY: build run clean 13 | # Ignore the runs that will cause errors. 14 | .IGNORE: $(patsubst %.c, %.output.txt, $(SOURCES_WITH_ERROR)) 15 | .SUFFIXES: # Delete the default suffixes 16 | 17 | CC := gcc -O3 18 | RM := rm 19 | 20 | build: $(PROGS) 21 | @echo "***Successfully built all benchmarks." 22 | 23 | $(PROGS): %: %.c 24 | @echo "Building" $@ 25 | $(CC) $< -o $@ 26 | 27 | run: $(OUTPUTS) 28 | @echo "***Successfully ran all benchmarks." 29 | 30 | $(OUTPUTS): %.output.txt: % 31 | @echo "Running" $< 32 | @/usr/bin/time $< > $@ 2> $<.error.txt 33 | 34 | clean: 35 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 36 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/src/src/stack_overflow_loop.c: -------------------------------------------------------------------------------- 1 | /* This software was developed at the National Institute of Standards and 2 | * Technology by employees of the Federal Government in the course of their 3 | * official duties. Pursuant to title 17 Section 105 of the United States 4 | * Code this software is not subject to copyright protection and is in the 5 | * public domain. NIST assumes no responsibility whatsoever for its use by 6 | * other parties, and makes no guarantees, expressed or implied, about its 7 | * quality, reliability, or any other characteristic. 8 | 9 | * We would appreciate acknowledgement if the software is used. 10 | * The SAMATE project website is: http://samate.nist.gov 11 | */ 12 | 13 | #include 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | char bStr[10]; 18 | for (unsigned i=1;i<=10;++i) { 19 | bStr[i] = (char)i + 'a'; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/src_makefiles/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES := $(sort $(wildcard src/*.c)) 2 | 3 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 4 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 5 | PROGS := $(patsubst %.c, %, $(SOURCES)) 6 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 7 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 8 | 9 | .PHONY: build run clean 10 | # Ignore the runs that will cause errors. 11 | .IGNORE: $(patsubst %.c, %.output.txt, $(SOURCES)) 12 | .SUFFIXES: # Delete the default suffixes 13 | 14 | CC := gcc -O3 15 | RM := rm 16 | 17 | build: $(PROGS) 18 | @echo "***Successfully built all benchmarks." 19 | 20 | $(PROGS): %: %.c 21 | @echo "Building" $@ 22 | $(INSTRU_CC) $< -o $@ 23 | 24 | run: $(OUTPUTS) 25 | @echo "***Successfully ran all benchmarks." 26 | 27 | $(OUTPUTS): %.output.txt: % 28 | @echo "Running" $< 29 | @/usr/bin/time $(INSTRU_BIN) $< > $@ 2> $<.error.txt 30 | 31 | clean: 32 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-81/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := valgrind 2 | INSTRU_BIN = $(VALGD) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/src/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := addresssanitizer 2 | INSTRU_CC = $(ASAN) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*-ok.c) $(wildcard ../src/*/*-bad.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := softboundcets 2 | INSTRU_CC = $(SOCETS) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*-ok.c) $(wildcard ../src/*/*-bad.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/283/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: realpath-bad setup 3 | 4 | clean: 5 | @rm -rf *-ok *-bad /tmp/foo *.output.txt *.error.txt 6 | 7 | realpath-bad: call_fb_realpath.c realpath-bad.c 8 | gcc -o realpath-bad call_fb_realpath.c realpath-bad.c 9 | 10 | setup: 11 | mkdir -p /tmp/foo/bar/foo/bar/foo/bar/foo/bar ; \ 12 | touch /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi ; \ 13 | ln -f -s /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 14 | 15 | run: realpath-bad setup 16 | ./realpath-bad /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/283/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: realpath-bad /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 11 | result: NB: abcdefgh is a symlink to abcdefghi. There is an overflow of the buffer resolved in fb_realpath by one, as the symlink is not too big but the target is too big to fit in the buffer. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/284/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: realpath-ok setup 3 | 4 | clean: 5 | @rm -rf *-ok *-bad /tmp/foo *.output.txt *.error.txt 6 | 7 | realpath-ok: call_fb_realpath.c realpath-ok.c 8 | gcc -o realpath-ok call_fb_realpath.c realpath-ok.c 9 | 10 | setup: 11 | mkdir -p /tmp/foo/bar/foo/bar/foo/bar/foo/bar ; \ 12 | touch /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi ; \ 13 | ln -f -s /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 14 | 15 | run: realpath-ok setup 16 | ./realpath-ok /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/284/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: realpath-ok /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 11 | result: resolved does not get overflowed. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/285/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: call-realpath-bad 3 | 4 | clean: 5 | @rm -f *-bad *.output.txt *.error.txt 6 | 7 | call-realpath-bad: call-realpath-bad.c realpath-2.4.2.c 8 | gcc -o call-realpath-bad call-realpath-bad.c realpath-2.4.2.c 9 | 10 | run: call-realpath-bad 11 | ./call-realpath-bad /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/285/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: call-realpath-bad /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa 11 | result: curpath, which is allocated at 46 bytes, is overflowed when a strcpy tries to copy 386 bytes into it, in function mt_realpath. a segfault occurs and the canary placed above curpath on the stack is overflowed. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/286/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: call-realpath-ok 3 | 4 | clean: 5 | @rm -f *-ok *.output.txt *.error.txt 6 | 7 | call-realpath-ok: call-realpath-ok.c realpath-2.4.2.c 8 | gcc -o call-realpath-ok call-realpath-ok.c realpath-2.4.2.c 9 | 10 | run: call-realpath-ok 11 | ./call-realpath-ok /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/286/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: call-realpath-ok /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa 11 | result: no overflow in curpath happens. the canary is unvoilated. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/287/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mapped-path-bad create 3 | 4 | clean: 5 | @rm -f *-bad create *.output.txt *.error.txt 6 | 7 | mapped-path-bad: mapped-path-bad.c 8 | gcc -o mapped-path-bad mapped-path-bad.c 9 | 10 | create: make-long-path.c 11 | gcc -o create make-long-path.c ; \ 12 | touch pathfile ; \ 13 | ./create 14 | 15 | run: mapped-path-bad create 16 | ./mapped-path-bad pathfile > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/287/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mapped-path-bad pathfile 11 | result: path gets overflowed in do_elem. 29 bytes written into it when it is only 10 bytes. canary (an int) which is just above path on the stack, gets clobbered 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/287/pathfile: -------------------------------------------------------------------------------- 1 | /tmp/aaaaaaaaaaaaaaaaaaaaaaaa -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/288/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mapped-path-ok create 3 | 4 | clean: 5 | @rm -f *-ok create *.output.txt *.error.txt 6 | 7 | mapped-path-ok: mapped-path-ok.c 8 | gcc -o mapped-path-ok mapped-path-ok.c 9 | 10 | create: make-long-path.c 11 | gcc -o create make-long-path.c ; \ 12 | touch pathfile ; \ 13 | ./create 14 | 15 | run: mapped-path-ok create 16 | ./mapped-path-ok pathfile > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/288/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mapped-path-ok pathfile 11 | result: canary not clobbered 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/288/pathfile: -------------------------------------------------------------------------------- 1 | /tmp/aaaaaaaaaaaaaaaaaaaaaaaa -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/289/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ns-lookup-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | ns-lookup-bad: ns-lookup-bad.c 8 | gcc -o ns-lookup-bad ns-lookup-bad.c 9 | 10 | create: create_address_file.c 11 | gcc -o create create_address_file.c ; \ 12 | ./create 13 | 14 | run: ns-lookup-bad create 15 | ./ns-lookup-bad b4.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/289/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: ns-lookup-bad b4.in 11 | result: sprintf into buf[999] in nslookupComplain causes a segmentation fault, as 1126 bytes is copied. 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/289/address_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/289/address_file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/289/b4.in: -------------------------------------------------------------------------------- 1 | web.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.mit.edu 2 | dns1.mit.edu 3 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/290/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ns-lookup-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | ns-lookup-ok: ns-lookup-ok.c 8 | gcc -o ns-lookup-ok ns-lookup-ok.c 9 | 10 | create: create_address_file.c 11 | gcc -o create create_address_file.c ; \ 12 | ./create 13 | 14 | run: ns-lookup-ok create 15 | ./ns-lookup-ok b4.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/290/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: ns-lookup-ok b4.in 11 | result: =999 bytes is always sprintf-ed into buf. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/290/address_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/290/address_file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/290/b4.in: -------------------------------------------------------------------------------- 1 | web.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.mit.edu 2 | dns1.mit.edu 3 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/291/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: sig-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create SIGFILE *.output.txt *.error.txt 6 | 7 | sig-bad: sig-bad.c 8 | gcc -o sig-bad sig-bad.c -I . -lresolv 9 | 10 | create: create_msg_file.c 11 | gcc -o create create_msg_file.c -lresolv ; \ 12 | ./create 13 | 14 | run: sig-bad create 15 | ./sig-bad > $<.output.txt 2> $<.error.txt 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/291/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: sig-bad 11 | result: cp1 gets overflowed in rrextract and a segmentation fault occurs when memcpy gets a negative 3rd argument. 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/292/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: sig-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create SIGFILE *.output.txt *.error.txt 6 | 7 | sig-ok: sig-ok.c 8 | gcc -o sig-ok sig-ok.c -I . -lresolv 9 | 10 | create: create_msg_file.c 11 | gcc -o create create_msg_file.c -lresolv ; \ 12 | ./create 13 | 14 | run: sig-ok create 15 | ./sig-ok > $<.output.txt 2> $<.error.txt 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/292/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: sig-ok 11 | result: rrextract detects this case and exits before the offending memcpy. 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/293/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: nxt-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | nxt-bad: nxt-bad.c 8 | gcc -o nxt-bad nxt-bad.c -I . -lresolv 9 | 10 | run: nxt-bad 11 | ./nxt-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/293/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: nxt-bad 11 | result: cp1 gets overflowed in rrextract and a segmentation fault occurs when memcpy gets a negative 3rd arg. memcpy casts the negative int to an unsigned int and tries to cpy 4GB of data. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/294/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: nxt-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | nxt-ok: nxt-ok.c 8 | gcc -o nxt-ok nxt-ok.c -I . -lresolv 9 | 10 | run: nxt-ok 11 | ./nxt-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/294/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: nxt-ok 11 | result: the memcpy doesn't happen because there is a check that the third arg is >= 0 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/295/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: iquery-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | iquery-bad: iquery-bad.c 8 | gcc -o iquery-bad iquery-bad.c -lresolv 9 | 10 | create: create_iquery.c 11 | gcc -o create create_iquery.c -lresolv ; \ 12 | ./create 13 | 14 | run: iquery-bad create 15 | ./iquery-bad b3.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/295/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: iquery-bad b3.in 11 | result: memcpy 27 bytes into anbuf in req_iquery, triggering a segmentation fault 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/295/b3.in: -------------------------------------------------------------------------------- 1 | 9283721 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/295/iquery-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/295/iquery-file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/296/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: iquery-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | iquery-ok: iquery-ok.c 8 | gcc -o iquery-ok iquery-ok.c -lresolv 9 | 10 | create: create_iquery.c 11 | gcc -o create create_iquery.c -lresolv ; \ 12 | ./create 13 | 14 | run: iquery-ok create 15 | ./iquery-ok b3.in > $<.output.txt 2> $<.error.txt 16 | 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/296/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: iquery-ok b3.in 11 | result: overflow detected and memcpy doesn't happen 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/296/b3.in: -------------------------------------------------------------------------------- 1 | 9283721 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/296/iquery-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/296/iquery-file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/297/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: crackaddr-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | crackaddr-bad: crackaddr-bad.c 8 | gcc -o crackaddr-bad crackaddr-bad.c 9 | 10 | run: crackaddr-bad 11 | ./crackaddr-bad < ./s1.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/297/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: crackaddr-bad < ./s1.in 11 | result: test_buf gets overflowed in function crackaddr. buf is just above test_buf on the stack, so its orginal contents, Original contents of buf, "GOOD", get replaced with overflow. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/297/s1.in: -------------------------------------------------------------------------------- 1 | <><><><><><><><><><><><><><><><><><><><><> 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/298/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: crackaddr-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | crackaddr-ok: crackaddr-ok.c 8 | gcc -o crackaddr-ok crackaddr-ok.c 9 | 10 | run: crackaddr-ok 11 | ./crackaddr-ok < ./s1.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/298/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: crackaddr-ok < ./s1.in 11 | result: buf doesn't get clobbered. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/298/s1.in: -------------------------------------------------------------------------------- 1 | <><><><><><><><><><><><><><><><><><><><><> 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/299/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ge-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ge-bad: ge-bad.c recipient.c util.c 8 | gcc -o ge-bad ge-bad.c recipient.c util.c -I . 9 | 10 | run: ge-bad 11 | ./ge-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/299/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: ge-bad 11 | result: nbuf gets overflowed in function recipient (it defined local to an else block). test_buf is just above nbuf on the stack, so its orginal contents, Original contents of test_buf, "GOOD", get replaced with overflow. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/300/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ge-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ge-ok: ge-ok.c recipient.c util.c 8 | gcc -o ge-ok ge-ok.c recipient.c util.c -I . 9 | 10 | run: ge-ok 11 | ./ge-ok > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/300/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: ge-ok 11 | result: test_buf does not get clobbered. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/301/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime1-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime1-bad: mime1-bad.c main.c 8 | gcc -o mime1-bad mime1-bad.c main.c -I . 9 | 10 | run: mime1-bad 11 | ./mime1-bad s3.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/301/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mime1-bad s3.in 11 | result: obuf gets overflowed in function mime7to8. canary is just above obuf on the stack, so its orginal contents, "GOOD", get replaced with overflow. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/301/s3.in: -------------------------------------------------------------------------------- 1 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= 2 | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb= 3 | ccccccccccccccccccccccccccccccccc= 4 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/302/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime1-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime1-ok: mime1-ok.c main.c 8 | gcc -o mime1-ok mime1-ok.c main.c -I . 9 | 10 | run: mime1-ok 11 | ./mime1-ok s3.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/302/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mime1-ok s3.in 11 | result: canary does not get clobbered. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/302/s3.in: -------------------------------------------------------------------------------- 1 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= 2 | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb= 3 | ccccccccccccccccccccccccccccccccc= 4 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/303/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime2-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime2-bad: mime2-bad.c 8 | gcc -o mime2-bad mime2-bad.c -I . 9 | 10 | run: mime2-bad 11 | ./mime2-bad s4.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/303/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mime2-bad s4.in 11 | result: fbuf gets overflowed in function mime7to8. canary is just above fbuf on the stack, so its orginal contents, "GOOD", get replaced with overflow. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/303/s4.in: -------------------------------------------------------------------------------- 1 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/304/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime2-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime2-ok: mime2-ok.c 8 | gcc -o mime2-ok mime2-ok.c -I . 9 | 10 | run: mime2-ok 11 | ./mime2-ok s4.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/304/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: mime2-ok s4.in 11 | result: canary does not get clobbered. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/304/s4.in: -------------------------------------------------------------------------------- 1 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/305/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: prescan-overflow-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | prescan-overflow-bad: prescan-overflow-bad.c 8 | gcc -o prescan-overflow-bad prescan-overflow-bad.c 9 | 10 | run: prescan-overflow-bad 11 | ./prescan-overflow-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/305/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: prescan-overflow-bad 11 | result: pvpbuf gets overflowed in function prescan. canary is just above pvbuf on the stack (both actually defined in parseaddr and passed as args to prescan). Original contents of canary, "GOOD", get replaced with overflow. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/306/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: prescan-overflow-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | prescan-overflow-ok: prescan-overflow-ok.c 8 | gcc -o prescan-overflow-ok prescan-overflow-ok.c 9 | 10 | run: prescan-overflow-ok 11 | ./prescan-overflow-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/306/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: prescan-overflow-ok 11 | result: canary does not get clobbered. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/307/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ttflag-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ttflag-bad: my-main.c ttflag-bad.c 8 | gcc -o ttflag-bad my-main.c ttflag-bad.c -I . 9 | 10 | run: ttflag-bad 11 | ./ttflag-bad -d 4294967200-100 > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/307/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: ttflag-bad -d 4294967200-100 11 | result: tTdvect, a global variable defined in my-main.c, gets underflowed in function tTflag. No canary to view results. tTvect is an alias for tTdvect and it is written via index first, i.e. tTvect[first++] = i. The index first is printed out and so you can verify that it goes negative. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/308/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ttflag-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ttflag-ok: my-main.c ttflag-ok.c 8 | gcc -o ttflag-ok my-main.c ttflag-ok.c -I . 9 | 10 | run: ttflag-ok 11 | ./ttflag-ok -d 4294967200-100 > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/308/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: no improper indexing into tTdvect. 11 | 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/309/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: txt-dns-file-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | txt-dns-file-bad: txt-dns-file-bad.c my-util.c 8 | gcc -o txt-dns-file-bad txt-dns-file-bad.c my-util.c -I . -lresolv 9 | 10 | run: txt-dns-file-bad 11 | ./txt-dns-file-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/309/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: txt-dns-file-bad 11 | result: rr is a pointer to a pointer to a RESOURCE_RECORD_T. (*rr)->rr_u.rr_txt is a buffer allocated on the heap. .rr_txt is of size defined by the *p which is being used to parse the "data" buffer that comes in as an arg to parse_dns_reply. A strncpy with .rr_txt as its destination uses as its third arg (specifying how many bytes to copy) the value *p which is not checked to make sure it is less than the size previously parsed out from data. oy. The copy causes a segmentation fault, asking to copy 255 bytes into a 100 byte buffer. 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/309/dns-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/309/dns-file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/310/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: txt-dns-file-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | txt-dns-file-ok: txt-dns-file-ok.c my-util.c 8 | gcc -o txt-dns-file-ok txt-dns-file-ok.c my-util.c -I . -lresolv 9 | 10 | run: txt-dns-file-ok 11 | ./txt-dns-file-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/310/README: -------------------------------------------------------------------------------- 1 | For more details, see the paper "Testing Static Analysis Tools Using 2 | Exploitable Overflows From Open Source Code", Misha Zitser, Richard Lippmann, 3 | and Tim Leek. 4 | 5 | COMPILING 6 | make clean 7 | make 8 | 9 | RUNNING TEST CASES 10 | run with: txt-dns-file-ok 11 | result: only 99 bytes are copied to the 100 byte buffer .rr_txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/310/dns-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/benchmarks-memsafe/SARD-testsuite-88/src/310/dns-file -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src/Makefile: -------------------------------------------------------------------------------- 1 | # Error number statistics: 2 | # 283:1 285:27 287:4 289:2 3 | # 291:1 293:1 295:1 297:28 299:2 4 | # 301:3 303:7 305:3 307:1 309:2 5 | # TOTAL: 83 6 | 7 | MAKDIRS := $(sort $(patsubst %/Makefile, %, $(wildcard */Makefile))) 8 | MAKDIRS_BUILDS := $(patsubst %, %/all, $(MAKDIRS)) 9 | MAKDIRS_RUNS := $(patsubst %, %/run, $(MAKDIRS)) 10 | MAKDIRS_CLEANS := $(patsubst %, %/clean, $(MAKDIRS)) 11 | 12 | .PHONY: build run clean $(MAKDIRS_BUILDS) $(MAKDIRS_RUNS) $(MAKDIRS_CLEANS) 13 | # Ignore the runs that will cause errors. 14 | .IGNORE: $(MAKDIRS_RUNS) 15 | .SUFFIXES: # Delete the default suffixes 16 | 17 | build: $(MAKDIRS_BUILDS) 18 | @echo "***Successfully built all benchmarks." 19 | 20 | $(MAKDIRS_BUILDS): %/all: % 21 | @echo "Building" $< 22 | @$(MAKE) -C $< all --no-print-directory 23 | 24 | run: $(MAKDIRS_RUNS) 25 | @echo "***Successfully ran all benchmarks." 26 | 27 | $(MAKDIRS_RUNS): %/run: % 28 | @echo "Running" $< 29 | @$(MAKE) -C $< run --no-print-directory 30 | 31 | clean: $(MAKDIRS_CLEANS) 32 | 33 | $(MAKDIRS_CLEANS): %/clean: % 34 | @$(MAKE) -C $< clean --no-print-directory 35 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/283/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: realpath-bad setup 3 | 4 | clean: 5 | @rm -rf *-ok *-bad /tmp/foo *.output.txt *.error.txt 6 | 7 | realpath-bad: call_fb_realpath.c realpath-bad.c 8 | $(INSTRU_CC) -o realpath-bad call_fb_realpath.c realpath-bad.c 9 | 10 | setup: 11 | mkdir -p /tmp/foo/bar/foo/bar/foo/bar/foo/bar ; \ 12 | touch /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi ; \ 13 | ln -f -s /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 14 | 15 | run: realpath-bad setup 16 | @/usr/bin/time $(INSTRU_BIN) ./realpath-bad /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/284/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: realpath-ok setup 3 | 4 | clean: 5 | @rm -rf *-ok *-bad /tmp/foo *.output.txt *.error.txt 6 | 7 | realpath-ok: call_fb_realpath.c realpath-ok.c 8 | $(INSTRU_CC) -o realpath-ok call_fb_realpath.c realpath-ok.c 9 | 10 | setup: 11 | mkdir -p /tmp/foo/bar/foo/bar/foo/bar/foo/bar ; \ 12 | touch /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi ; \ 13 | ln -f -s /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefghi /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh 14 | 15 | run: realpath-ok setup 16 | @/usr/bin/time $(INSTRU_BIN) ./realpath-ok /tmp/foo/bar/foo/bar/foo/bar/foo/bar/abcdefgh > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/285/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: call-realpath-bad 3 | 4 | clean: 5 | @rm -f *-bad *.output.txt *.error.txt 6 | 7 | call-realpath-bad: call-realpath-bad.c realpath-2.4.2.c 8 | $(INSTRU_CC) -o call-realpath-bad call-realpath-bad.c realpath-2.4.2.c 9 | 10 | run: call-realpath-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./call-realpath-bad /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/286/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: call-realpath-ok 3 | 4 | clean: 5 | @rm -f *-ok *.output.txt *.error.txt 6 | 7 | call-realpath-ok: call-realpath-ok.c realpath-2.4.2.c 8 | $(INSTRU_CC) -o call-realpath-ok call-realpath-ok.c realpath-2.4.2.c 9 | 10 | run: call-realpath-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./call-realpath-ok /aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aaa/aa/aaa > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/287/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mapped-path-bad create 3 | 4 | clean: 5 | @rm -f *-bad create *.output.txt *.error.txt 6 | 7 | mapped-path-bad: mapped-path-bad.c 8 | $(INSTRU_CC) -o mapped-path-bad mapped-path-bad.c 9 | 10 | create: make-long-path.c 11 | @gcc -o create make-long-path.c ; \ 12 | touch pathfile ; \ 13 | ./create 14 | 15 | run: mapped-path-bad create 16 | @/usr/bin/time $(INSTRU_BIN) ./mapped-path-bad pathfile > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/288/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mapped-path-ok create 3 | 4 | clean: 5 | @rm -f *-ok create *.output.txt *.error.txt 6 | 7 | mapped-path-ok: mapped-path-ok.c 8 | $(INSTRU_CC) -o mapped-path-ok mapped-path-ok.c 9 | 10 | create: make-long-path.c 11 | @gcc -o create make-long-path.c ; \ 12 | touch pathfile ; \ 13 | ./create 14 | 15 | run: mapped-path-ok create 16 | @/usr/bin/time $(INSTRU_BIN) ./mapped-path-ok pathfile > $<.output.txt 2> $<.error.txt 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/289/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ns-lookup-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | ns-lookup-bad: ns-lookup-bad.c 8 | $(INSTRU_CC) -o ns-lookup-bad ns-lookup-bad.c 9 | 10 | create: create_address_file.c 11 | @gcc -o create create_address_file.c ; \ 12 | ./create 13 | 14 | run: ns-lookup-bad create 15 | @/usr/bin/time $(INSTRU_BIN) ./ns-lookup-bad b4.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/290/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ns-lookup-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | ns-lookup-ok: ns-lookup-ok.c 8 | $(INSTRU_CC) -o ns-lookup-ok ns-lookup-ok.c 9 | 10 | create: create_address_file.c 11 | @gcc -o create create_address_file.c ; \ 12 | ./create 13 | 14 | run: ns-lookup-ok create 15 | @/usr/bin/time $(INSTRU_BIN) ./ns-lookup-ok b4.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/291/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: sig-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create SIGFILE *.output.txt *.error.txt 6 | 7 | sig-bad: sig-bad.c 8 | $(INSTRU_CC) -o sig-bad sig-bad.c -I . -lresolv 9 | 10 | create: create_msg_file.c 11 | @gcc -o create create_msg_file.c -lresolv ; \ 12 | ./create 13 | 14 | run: sig-bad create 15 | @/usr/bin/time $(INSTRU_BIN) ./sig-bad > $<.output.txt 2> $<.error.txt 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/292/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: sig-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create SIGFILE *.output.txt *.error.txt 6 | 7 | sig-ok: sig-ok.c 8 | $(INSTRU_CC) -o sig-ok sig-ok.c -I . -lresolv 9 | 10 | create: create_msg_file.c 11 | @gcc -o create create_msg_file.c -lresolv ; \ 12 | ./create 13 | 14 | run: sig-ok create 15 | @/usr/bin/time $(INSTRU_BIN) ./sig-ok > $<.output.txt 2> $<.error.txt 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/293/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: nxt-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | nxt-bad: nxt-bad.c 8 | $(INSTRU_CC) -o nxt-bad nxt-bad.c -I . -lresolv 9 | 10 | run: nxt-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./nxt-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/294/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: nxt-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | nxt-ok: nxt-ok.c 8 | $(INSTRU_CC) -o nxt-ok nxt-ok.c -I . -lresolv 9 | 10 | run: nxt-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./nxt-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/295/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: iquery-bad create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | iquery-bad: iquery-bad.c 8 | $(INSTRU_CC) -o iquery-bad iquery-bad.c -lresolv 9 | 10 | create: create_iquery.c 11 | @gcc -o create create_iquery.c -lresolv ; \ 12 | ./create 13 | 14 | run: iquery-bad create 15 | @/usr/bin/time $(INSTRU_BIN) ./iquery-bad b3.in > $<.output.txt 2> $<.error.txt 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/296/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: iquery-ok create 3 | 4 | clean: 5 | @rm -f *-bad *-ok create *.output.txt *.error.txt 6 | 7 | iquery-ok: iquery-ok.c 8 | $(INSTRU_CC) -o iquery-ok iquery-ok.c -lresolv 9 | 10 | create: create_iquery.c 11 | @gcc -o create create_iquery.c -lresolv ; \ 12 | ./create 13 | 14 | run: iquery-ok create 15 | @/usr/bin/time $(INSTRU_BIN) ./iquery-ok b3.in > $<.output.txt 2> $<.error.txt 16 | 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/297/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: crackaddr-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | crackaddr-bad: crackaddr-bad.c 8 | $(INSTRU_CC) -o crackaddr-bad crackaddr-bad.c 9 | 10 | run: crackaddr-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./crackaddr-bad < ./s1.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/298/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: crackaddr-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | crackaddr-ok: crackaddr-ok.c 8 | $(INSTRU_CC) -o crackaddr-ok crackaddr-ok.c 9 | 10 | run: crackaddr-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./crackaddr-ok < ./s1.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/299/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ge-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ge-bad: ge-bad.c recipient.c util.c 8 | $(INSTRU_CC) -o ge-bad ge-bad.c recipient.c util.c -I . 9 | 10 | run: ge-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./ge-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/300/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ge-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ge-ok: ge-ok.c recipient.c util.c 8 | $(INSTRU_CC) -o ge-ok ge-ok.c recipient.c util.c -I . 9 | 10 | run: ge-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./ge-ok > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/301/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime1-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime1-bad: mime1-bad.c main.c 8 | $(INSTRU_CC) -o mime1-bad mime1-bad.c main.c -I . 9 | 10 | run: mime1-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./mime1-bad s3.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/302/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime1-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime1-ok: mime1-ok.c main.c 8 | $(INSTRU_CC) -o mime1-ok mime1-ok.c main.c -I . 9 | 10 | run: mime1-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./mime1-ok s3.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/303/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime2-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime2-bad: mime2-bad.c 8 | $(INSTRU_CC) -o mime2-bad mime2-bad.c -I . 9 | 10 | run: mime2-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./mime2-bad s4.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/304/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: mime2-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | mime2-ok: mime2-ok.c 8 | $(INSTRU_CC) -o mime2-ok mime2-ok.c -I . 9 | 10 | run: mime2-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./mime2-ok s4.in > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/305/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: prescan-overflow-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | prescan-overflow-bad: prescan-overflow-bad.c 8 | $(INSTRU_CC) -o prescan-overflow-bad prescan-overflow-bad.c 9 | 10 | run: prescan-overflow-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./prescan-overflow-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/306/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: prescan-overflow-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | prescan-overflow-ok: prescan-overflow-ok.c 8 | $(INSTRU_CC) -o prescan-overflow-ok prescan-overflow-ok.c 9 | 10 | run: prescan-overflow-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./prescan-overflow-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/307/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ttflag-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ttflag-bad: my-main.c ttflag-bad.c 8 | $(INSTRU_CC) -o ttflag-bad my-main.c ttflag-bad.c -I . 9 | 10 | run: ttflag-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./ttflag-bad -d 4294967200-100 > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/308/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: ttflag-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | ttflag-ok: my-main.c ttflag-ok.c 8 | $(INSTRU_CC) -o ttflag-ok my-main.c ttflag-ok.c -I . 9 | 10 | run: ttflag-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./ttflag-ok -d 4294967200-100 > $<.output.txt 2> $<.error.txt 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/309/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: txt-dns-file-bad 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | txt-dns-file-bad: txt-dns-file-bad.c my-util.c 8 | $(INSTRU_CC) -o txt-dns-file-bad txt-dns-file-bad.c my-util.c -I . -lresolv 9 | 10 | run: txt-dns-file-bad 11 | @/usr/bin/time $(INSTRU_BIN) ./txt-dns-file-bad > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/310/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: txt-dns-file-ok 3 | 4 | clean: 5 | @rm -f *-bad *-ok *.output.txt *.error.txt 6 | 7 | txt-dns-file-ok: txt-dns-file-ok.c my-util.c 8 | $(INSTRU_CC) -o txt-dns-file-ok txt-dns-file-ok.c my-util.c -I . -lresolv 9 | 10 | run: txt-dns-file-ok 11 | @/usr/bin/time $(INSTRU_BIN) ./txt-dns-file-ok > $<.output.txt 2> $<.error.txt 12 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/src_makefiles/Makefile: -------------------------------------------------------------------------------- 1 | MAKDIRS := $(sort $(patsubst %/Makefile, %, $(wildcard */Makefile))) 2 | MAKDIRS_BUILDS := $(patsubst %, %/all, $(MAKDIRS)) 3 | MAKDIRS_RUNS := $(patsubst %, %/run, $(MAKDIRS)) 4 | MAKDIRS_CLEANS := $(patsubst %, %/clean, $(MAKDIRS)) 5 | 6 | .PHONY: build run clean $(MAKDIRS_BUILDS) $(MAKDIRS_RUNS) $(MAKDIRS_CLEANS) 7 | # Ignore the runs that will cause errors. 8 | .IGNORE: $(MAKDIRS_RUNS) 9 | .SUFFIXES: # Delete the default suffixes 10 | 11 | build: $(MAKDIRS_BUILDS) 12 | @echo "***Successfully built all benchmarks." 13 | 14 | $(MAKDIRS_BUILDS): %/all: % 15 | @echo "Building" $< 16 | @$(MAKE) -C $< all --no-print-directory 17 | 18 | run: $(MAKDIRS_RUNS) 19 | @echo "***Successfully ran all benchmarks." 20 | 21 | $(MAKDIRS_RUNS): %/run: % 22 | @echo "Running" $< 23 | @$(MAKE) -C $< run --no-print-directory 24 | 25 | clean: $(MAKDIRS_CLEANS) 26 | 27 | $(MAKDIRS_CLEANS): %/clean: % 28 | @$(MAKE) -C $< clean --no-print-directory 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-88/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := valgrind 2 | INSTRU_BIN = $(VALGD) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*-ok.c) $(wildcard ../src/*/*-bad.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := addresssanitizer 2 | INSTRU_CC = $(ASAN) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*/*.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/movec-memsafe/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/*/Makefile))) 2 | DIRS_ORDINARY_RULE := $(filter-out $(DIRS_ADHOC_RULE), $(DIRS)) 3 | OUTPUT_DIRS = $(patsubst %, $(OUTPUT_DIR)/%, $(DIRS)) 4 | OUTPUT_DIRS_ORDINARY_RULE = $(patsubst %, $(OUTPUT_DIR)/%, $(DIRS_ORDINARY_RULE)) 5 | 6 | TOOLNAME := movec-memsafe 7 | CUSTOM_INSTRU_TARGETS = $(OUTPUT_DIRS) 8 | 9 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 10 | $(wildcard ../src/*/*/*.c)) 11 | 12 | include ../../Makefile.default 13 | 14 | # Ordinary benchmarks. 15 | $(OUTPUT_DIRS_ORDINARY_RULE): $(OUTPUT_DIR)/%: ../src/% $(wildcard ../src/%/*.c) 16 | @$(MKDIR) --parents $@ 17 | @echo "Instrumenting" $< 18 | @$(MOVEC) -p $< -d $@ 19 | @$(COPY) $(shell echo $< | sed "s/src/src_makefiles/g")/Makefile $@/Makefile 20 | @echo "Building" $@ 21 | @export INSTRU_CC="$(INSTRU_CC) $(INSTRU_CC_OPTS)"; $(MAKE) -C $@ 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := softboundcets 2 | INSTRU_CC = $(SOCETS) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*/*.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/831/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-large 2 | 3 | basic-00180-large: basic-00180-large.c 4 | gcc -o basic-00180-large $^ 5 | 6 | run: basic-00180-large 7 | ./basic-00180-large 1 2 3 10 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/832/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-med 2 | 3 | basic-00180-med: basic-00180-med.c 4 | gcc -o basic-00180-med $^ 5 | 6 | run: basic-00180-med 7 | ./basic-00180-med 1 2 10 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/833/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-min 2 | 3 | basic-00180-min: basic-00180-min.c 4 | gcc -o basic-00180-min $^ 5 | 6 | run: basic-00180-min 7 | ./basic-00180-min 1 10 3 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/834/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-ok 2 | 3 | basic-00180-ok: basic-00180-ok.c 4 | gcc -o basic-00180-ok $^ 5 | 6 | run: basic-00180-ok 7 | ./basic-00180-ok 1 10 3 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/835/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-large 2 | 3 | basic-00181-large: basic-00181-large.c 4 | gcc -o basic-00181-large $^ 5 | 6 | run: basic-00181-large 7 | export STRINGLEN_LARGE=1234567890; ./basic-00181-large > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/836/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-med 2 | 3 | basic-00181-med: basic-00181-med.c 4 | gcc -o basic-00181-med $^ 5 | 6 | run: basic-00181-med 7 | export STRINGLEN_MED=1234567890; ./basic-00181-med > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/837/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-min 2 | 3 | basic-00181-min: basic-00181-min.c 4 | gcc -o basic-00181-min $^ 5 | 6 | run: basic-00181-min 7 | export STRINGLEN_MIN=1234567890; ./basic-00181-min > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/838/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-ok 2 | 3 | basic-00181-ok: basic-00181-ok.c 4 | gcc -o basic-00181-ok $^ 5 | 6 | run: basic-00181-ok 7 | export STRINGLEN_OK=123; ./basic-00181-ok > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/839/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-large 2 | 3 | basic-00182-large: basic-00182-large.c 4 | gcc -o basic-00182-large $^ 5 | 6 | run: basic-00182-large 7 | ./basic-00182-large > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/839/TestInputFile1: -------------------------------------------------------------------------------- 1 | 1234567890 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/840/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-med 2 | 3 | basic-00182-med: basic-00182-med.c 4 | gcc -o basic-00182-med $^ 5 | 6 | run: basic-00182-med 7 | ./basic-00182-med > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/840/TestInputFile1: -------------------------------------------------------------------------------- 1 | 1234567890 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/841/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-min 2 | 3 | basic-00182-min: basic-00182-min.c 4 | gcc -o basic-00182-min $^ 5 | 6 | run: basic-00182-min 7 | ./basic-00182-min > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/841/TestInputFile1: -------------------------------------------------------------------------------- 1 | 1234567890 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/842/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-ok 2 | 3 | basic-00182-ok: basic-00182-ok.c 4 | gcc -o basic-00182-ok $^ 5 | 6 | run: basic-00182-ok 7 | ./basic-00182-ok > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/000/842/TestInputFile1: -------------------------------------------------------------------------------- 1 | 1234567890 2 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src/Makefile: -------------------------------------------------------------------------------- 1 | MAKDIRS := $(sort $(patsubst %/Makefile, %, $(wildcard */*/Makefile))) 2 | MAKDIRS_BUILDS := $(patsubst %, %/build, $(MAKDIRS)) 3 | MAKDIRS_RUNS := $(patsubst %, %/run, $(MAKDIRS)) 4 | MAKDIRS_CLEANS := $(patsubst %, %/clean, $(MAKDIRS)) 5 | 6 | .PHONY: build run clean $(MAKDIRS_BUILDS) $(MAKDIRS_RUNS) $(MAKDIRS_CLEANS) 7 | # Ignore the runs that will cause errors. 8 | .IGNORE: $(MAKDIRS_RUNS) 9 | .SUFFIXES: # Delete the default suffixes 10 | 11 | build: $(MAKDIRS_BUILDS) 12 | @echo "***Successfully built all benchmarks." 13 | 14 | $(MAKDIRS_BUILDS): %/build: % 15 | @echo "Building" $< 16 | @$(MAKE) -C $< build --no-print-directory 17 | 18 | run: $(MAKDIRS_RUNS) 19 | @echo "***Successfully ran all benchmarks." 20 | 21 | $(MAKDIRS_RUNS): %/run: % 22 | @echo "Running" $< 23 | @$(MAKE) -C $< run --no-print-directory 24 | 25 | clean: $(MAKDIRS_CLEANS) 26 | 27 | $(MAKDIRS_CLEANS): %/clean: % 28 | @$(MAKE) -C $< clean --no-print-directory 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/831/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-large 2 | 3 | basic-00180-large: basic-00180-large.c 4 | $(INSTRU_CC) -o basic-00180-large $^ 5 | 6 | run: basic-00180-large 7 | $(INSTRU_BIN) ./basic-00180-large 1 2 3 10 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/832/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-med 2 | 3 | basic-00180-med: basic-00180-med.c 4 | $(INSTRU_CC) -o basic-00180-med $^ 5 | 6 | run: basic-00180-med 7 | $(INSTRU_BIN) ./basic-00180-med 1 2 10 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/833/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-min 2 | 3 | basic-00180-min: basic-00180-min.c 4 | $(INSTRU_CC) -o basic-00180-min $^ 5 | 6 | run: basic-00180-min 7 | $(INSTRU_BIN) ./basic-00180-min 1 10 3 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/834/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00180-ok 2 | 3 | basic-00180-ok: basic-00180-ok.c 4 | $(INSTRU_CC) -o basic-00180-ok $^ 5 | 6 | run: basic-00180-ok 7 | $(INSTRU_BIN) ./basic-00180-ok 1 10 3 4 > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00180-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/835/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-large 2 | 3 | basic-00181-large: basic-00181-large.c 4 | $(INSTRU_CC) -o basic-00181-large $^ 5 | 6 | run: basic-00181-large 7 | export STRINGLEN_LARGE=1234567890; ./basic-00181-large > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/836/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-med 2 | 3 | basic-00181-med: basic-00181-med.c 4 | $(INSTRU_CC) -o basic-00181-med $^ 5 | 6 | run: basic-00181-med 7 | export STRINGLEN_MED=1234567890; ./basic-00181-med > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/837/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-min 2 | 3 | basic-00181-min: basic-00181-min.c 4 | $(INSTRU_CC) -o basic-00181-min $^ 5 | 6 | run: basic-00181-min 7 | export STRINGLEN_MIN=1234567890; ./basic-00181-min > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/838/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00181-ok 2 | 3 | basic-00181-ok: basic-00181-ok.c 4 | $(INSTRU_CC) -o basic-00181-ok $^ 5 | 6 | run: basic-00181-ok 7 | export STRINGLEN_OK=123; ./basic-00181-ok > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00181-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/839/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-large 2 | 3 | basic-00182-large: basic-00182-large.c 4 | $(INSTRU_CC) -o basic-00182-large $^ 5 | 6 | run: basic-00182-large 7 | $(INSTRU_BIN) ./basic-00182-large > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-large *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/840/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-med 2 | 3 | basic-00182-med: basic-00182-med.c 4 | $(INSTRU_CC) -o basic-00182-med $^ 5 | 6 | run: basic-00182-med 7 | $(INSTRU_BIN) ./basic-00182-med > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-med *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/841/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-min 2 | 3 | basic-00182-min: basic-00182-min.c 4 | $(INSTRU_CC) -o basic-00182-min $^ 5 | 6 | run: basic-00182-min 7 | $(INSTRU_BIN) ./basic-00182-min > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-min *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/000/842/Makefile: -------------------------------------------------------------------------------- 1 | build: basic-00182-ok 2 | 3 | basic-00182-ok: basic-00182-ok.c 4 | $(INSTRU_CC) -o basic-00182-ok $^ 5 | 6 | run: basic-00182-ok 7 | $(INSTRU_BIN) ./basic-00182-ok > $<.output.txt 2> $<.error.txt 8 | 9 | clean: 10 | @rm -f basic-00182-ok *.output.txt *.error.txt 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/src_makefiles/Makefile: -------------------------------------------------------------------------------- 1 | MAKDIRS := $(sort $(patsubst %/Makefile, %, $(wildcard */*/Makefile))) 2 | MAKDIRS_BUILDS := $(patsubst %, %/build, $(MAKDIRS)) 3 | MAKDIRS_RUNS := $(patsubst %, %/run, $(MAKDIRS)) 4 | MAKDIRS_CLEANS := $(patsubst %, %/clean, $(MAKDIRS)) 5 | 6 | .PHONY: build run clean $(MAKDIRS_BUILDS) $(MAKDIRS_RUNS) $(MAKDIRS_CLEANS) 7 | # Ignore the runs that will cause errors. 8 | .IGNORE: $(MAKDIRS_RUNS) 9 | .SUFFIXES: # Delete the default suffixes 10 | 11 | build: $(MAKDIRS_BUILDS) 12 | @echo "***Successfully built all benchmarks." 13 | 14 | $(MAKDIRS_BUILDS): %/build: % 15 | @echo "Building" $< 16 | @$(MAKE) -C $< build --no-print-directory 17 | 18 | run: $(MAKDIRS_RUNS) 19 | @echo "***Successfully ran all benchmarks." 20 | 21 | $(MAKDIRS_RUNS): %/run: % 22 | @echo "Running" $< 23 | @$(MAKE) -C $< run --no-print-directory 24 | 25 | clean: $(MAKDIRS_CLEANS) 26 | 27 | $(MAKDIRS_CLEANS): %/clean: % 28 | @$(MAKE) -C $< clean --no-print-directory 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89-2/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := valgrind 2 | INSTRU_BIN = $(VALGD) 3 | 4 | DIRS := $(sort $(patsubst ../src/%/Makefile, %, $(wildcard ../src/*/*/Makefile))) 5 | COPY_MORE_MAKEFILES = \ 6 | for dir in $(DIRS); do \ 7 | if [ -d ../src_makefiles/$${dir} ]; then \ 8 | cp ../src_makefiles/$${dir}/Makefile $(OUTPUT_DIR)/$${dir}/Makefile; \ 9 | fi; \ 10 | done 11 | 12 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 13 | $(wildcard ../src/*/*/*.c)) 14 | 15 | include ../../Makefile.default 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := addresssanitizer 2 | INSTRU_CC = $(ASAN) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/*/*/*/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/movec-memsafe/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := movec-memsafe 2 | INSTRU_CC_OPTS := -pthread 3 | SOURCES := $(sort $(shell find ../src -name *.c)) 4 | SOURCES_WITH_ERROR := $(patsubst ../src/%.c, %.c, $(SOURCES)) 5 | 6 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, $(SOURCES)) 7 | 8 | include ../../Makefile.default 9 | 10 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c 11 | @echo "Instrumenting" $< 12 | $(MOVEC) -c $< -o $@.c 13 | @echo "Building" $@ 14 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $@.c -o $@ 15 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := softboundcets 2 | INSTRU_CC = $(SOCETS) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/*/*/*/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/src/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES := $(sort $(wildcard 000/*/*/*.c)) 2 | 3 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 4 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 5 | PROGS := $(patsubst %.c, %, $(SOURCES)) 6 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 7 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 8 | 9 | .PHONY: build run clean 10 | # Ignore the runs that will cause errors. 11 | .IGNORE: $(patsubst %.c, %.output.txt, $(SOURCES)) 12 | .SUFFIXES: # Delete the default suffixes 13 | 14 | CC := gcc -O3 15 | RM := rm 16 | 17 | build: $(PROGS) 18 | @echo "***Successfully built all benchmarks." 19 | 20 | $(PROGS): %: %.c 21 | @echo "Building" $@ 22 | $(CC) $< -o $@ -pthread 23 | 24 | run: $(OUTPUTS) 25 | @echo "***Successfully ran all benchmarks." 26 | 27 | $(OUTPUTS): %.output.txt: % 28 | @echo "Running" $< 29 | @/usr/bin/time $< > $@ 2> $<.error.txt 30 | 31 | clean: 32 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/src_makefiles/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES := $(sort $(wildcard 000/*/*/*.c)) 2 | 3 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 4 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 5 | PROGS := $(patsubst %.c, %, $(SOURCES)) 6 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 7 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 8 | 9 | .PHONY: build run clean 10 | # Ignore the runs that will cause errors. 11 | .IGNORE: $(patsubst %.c, %.output.txt, $(SOURCES)) 12 | .SUFFIXES: # Delete the default suffixes 13 | 14 | CC := gcc -O3 15 | RM := rm 16 | 17 | build: $(PROGS) 18 | @echo "***Successfully built all benchmarks." 19 | 20 | $(PROGS): %: %.c 21 | @echo "Building" $@ 22 | $(INSTRU_CC) $< -o $@ -pthread 23 | 24 | run: $(OUTPUTS) 25 | @echo "***Successfully ran all benchmarks." 26 | 27 | $(OUTPUTS): %.output.txt: % 28 | @echo "Running" $< 29 | @/usr/bin/time $(INSTRU_BIN) $< > $@ 2> $<.error.txt 30 | 31 | clean: 32 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/SARD-testsuite-89/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := valgrind 2 | INSTRU_BIN = $(VALGD) 3 | 4 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 5 | $(sort $(wildcard ../src/*/*/*/*.c))) 6 | 7 | include ../../Makefile.default 8 | -------------------------------------------------------------------------------- /benchmarks-memsafe/grep_time_mem.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Grep the time and memory information from the files in arguments. 3 | # Sum up the elapsed times in these files. 4 | # Find out the maximum resident set size among them. 5 | 6 | time=0 7 | mrss=0 8 | for file in $* 9 | do 10 | line=$(cat ${file} | grep elapsed | grep avgtext | grep avgdata | grep maxresident) 11 | 12 | # Get an elapsed time in the [h:]mm:ss.mm format. 13 | elapsed=${line%elapsed*} 14 | elapsed=${elapsed##*"system "} 15 | # Convert to seconds. 16 | seconds=$(echo ${elapsed} | awk -F: '{ if (NF == 1) {print $NF} else if (NF == 2) {print $1 * 60 + $2} else if (NF==3) {print $1 * 3600 + $2 * 60 + $3} }') 17 | # Convert 0 second to 0.01 second due to the precision limit. 18 | if [ "${seconds}" = "0" ]; then seconds=0.01; fi 19 | # Sum up the seconds. 20 | time=$(echo "${time} + ${seconds}" | awk -F+ '{ print $1 + $2 }') 21 | 22 | # Get an maximum resident set size. 23 | maxresident=${line%maxresident*} 24 | maxresident=${maxresident##*"avgdata "} 25 | # Find out the maximum resident set size. 26 | if [ ${mrss} -lt ${maxresident} ]; then 27 | mrss=${maxresident} 28 | fi 29 | echo "Time:" ${elapsed} " RSS:" ${maxresident} 30 | done 31 | echo "#### Elapsed (wall clock) time (seconds): ${time}" 32 | echo "#### Maximum resident set size (kbytes): ${mrss}" 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := $(patsubst %, ../src/%, c-syntax all-mem-err nptrs) 2 | 3 | TOOLNAME := addresssanitizer 4 | INSTRU_CC = $(ASAN) 5 | 6 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 7 | $(sort $(wildcard $(patsubst %, %/*.c, $(DIRS))))) 8 | 9 | include ../../Makefile.default 10 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := $(patsubst %, ../src/%, c-syntax all-mem-err nptrs) 2 | 3 | TOOLNAME := softboundcets 4 | INSTRU_CC = $(SOCETS) 5 | 6 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 7 | $(sort $(wildcard $(patsubst %, %/*.c, $(DIRS))))) 8 | 9 | include ../../Makefile.default 10 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := c-syntax all-mem-err nptrs 2 | SOURCES := $(sort $(wildcard $(patsubst %, %/*.c, $(DIRS)))) 3 | SOURCES_WITH_ERROR := \ 4 | all-mem-err/5_segment_id_1.w.c \ 5 | all-mem-err/5_segment_id_2.c \ 6 | all-mem-err/5_segment_id_exploit.c \ 7 | all-mem-err/5_segment_if_1.c \ 8 | all-mem-err/5_segment_if_2.c \ 9 | all-mem-err/s3_wf_stdlib_free.c \ 10 | all-mem-err/s3_wf_string.c \ 11 | c-syntax/2_psk_cf.c 12 | 13 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 14 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 15 | PROGS := $(patsubst %.c, %, $(SOURCES)) 16 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 17 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 18 | 19 | .PHONY: build run clean 20 | # Ignore the runs that will cause errors. 21 | .IGNORE: $(patsubst %.c, %.output.txt, $(SOURCES_WITH_ERROR)) 22 | .SUFFIXES: # Delete the default suffixes 23 | 24 | CC := gcc -O3 25 | RM := rm 26 | 27 | build: $(PROGS) 28 | @echo "***Successfully built all benchmarks." 29 | 30 | $(PROGS): %: %.c 31 | @echo "Building" $@ 32 | $(CC) $< -o $@ 33 | 34 | run: $(OUTPUTS) 35 | @echo "***Successfully ran all benchmarks." 36 | 37 | $(OUTPUTS): %.output.txt: % 38 | @echo "Running" $< 39 | @/usr/bin/time $< > $@ 2> $<.error.txt 40 | @../../grep_time_mem.sh $<.error.txt 41 | 42 | clean: 43 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 44 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/1_mp-ok.c: -------------------------------------------------------------------------------- 1 | /*Manufactured pointers.*/ 2 | 3 | int main() 4 | { 5 | unsigned long *p; 6 | unsigned long i, addr = (unsigned long)&i; 7 | 8 | p = (unsigned long *)addr; 9 | i = *p; 10 | *p = i; 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/1_mp.c: -------------------------------------------------------------------------------- 1 | /*Manufactured pointers.*/ 2 | 3 | int main() 4 | { 5 | unsigned long *p; 6 | unsigned long i, addr = (unsigned long)&i; 7 | 8 | p = (unsigned long *)addr; 9 | i = *p; 10 | i = *(p+1); /*spatial error*/ 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/1_np.c: -------------------------------------------------------------------------------- 1 | /*Null pointers.*/ 2 | #include 3 | int main() 4 | { 5 | unsigned long *p = NULL, i; 6 | 7 | i = *p; /*null pointer error*/ 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/1_up.c: -------------------------------------------------------------------------------- 1 | /*Uninitialized pointers.*/ 2 | #include 3 | int main() 4 | { 5 | unsigned long *p, i; 6 | 7 | i = *p; /*uninitialized pointer error*/ 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/1_up.w.c: -------------------------------------------------------------------------------- 1 | /*Uninitialized pointers.*/ 2 | #include 3 | int main() 4 | { 5 | unsigned long *p, i; 6 | 7 | *p = i; /*uninitialized pointer error*/ 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/2_long_overflow.w.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) long overflow.*/ 2 | 3 | int main() 4 | { 5 | int a[100]; 6 | int ret = 0; 7 | int b[100]; 8 | 9 | int *p = &ret; 10 | 11 | *(p+10) = ret; /*spatial error*/ 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/2_o_g.w.c: -------------------------------------------------------------------------------- 1 | /*Object-level overflows in global variables.*/ 2 | 3 | int a[100]; 4 | int ret; 5 | int b[100]; 6 | 7 | int main() 8 | { 9 | int *p = &ret; 10 | 11 | *(p+10) = ret; /*spatial error*/ 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/2_so_sk.w.c: -------------------------------------------------------------------------------- 1 | /*Sub-object overflows in stack.*/ 2 | 3 | struct st 4 | { 5 | int a1[2]; 6 | int a2[2][3]; 7 | }; 8 | 9 | int main() 10 | { 11 | int ret; 12 | 13 | struct st s; 14 | int *p1; 15 | 16 | /*one dimensional*/ 17 | p1 = s.a1; 18 | p1[0] = ret; 19 | *(p1+2) = ret; /*sub-object spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/3_temporal_df.c: -------------------------------------------------------------------------------- 1 | /*Temporal errors: double free.*/ 2 | 3 | #include 4 | 5 | int *malloc_int(int x) 6 | { 7 | return (int*)malloc(x*sizeof(int)); 8 | } 9 | 10 | void allocate(int **addr) 11 | { 12 | *addr = malloc_int(2); 13 | } 14 | 15 | int main() 16 | { 17 | int *p1, *p2; 18 | 19 | allocate(&p1); 20 | p2 = p1; 21 | free(p1); 22 | free(p2); /*temporal error*/ 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/3_temporal_uaf_h.c: -------------------------------------------------------------------------------- 1 | /*Use-after-free of heap memory.*/ 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int *n, *r; 8 | int ret; 9 | 10 | n = malloc(sizeof(int)*5); 11 | r = n; 12 | 13 | free(r); 14 | ret = n[0]; /*temporal error*/ 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/3_temporal_uaf_quarantine.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define N 80 4 | #define SIZE 128*1024*1024 /* 128MB */ 5 | 6 | int *gp; 7 | 8 | int main() 9 | { 10 | int i, *p[N]; 11 | 12 | for(i = 0; i < N; i++) 13 | { 14 | p[i] = (int*)malloc(SIZE); 15 | *p[i] = i; 16 | if(i==N/2) gp = p[i]; /* Remember a freed object */ 17 | free(p[i]); 18 | } 19 | 20 | for(i = 0; i < N; i++) 21 | { 22 | p[i] = (int*)malloc(SIZE); /* Reallocate memory */ 23 | *p[i] = i; 24 | } 25 | 26 | i = *gp; /* Use-after-free error: */ 27 | /* ASan Valgrind cannot detect it. */ 28 | /* MOVEC can detect it. */ 29 | 30 | for(i = 0; i < N; i++) 31 | { 32 | free(p[i]); 33 | } 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/3_temporal_uaf_sk.w.c: -------------------------------------------------------------------------------- 1 | /*Use-after-free of stack memory.*/ 2 | #include 3 | #include 4 | 5 | void f_stack(int **p_addr) 6 | { 7 | int x; 8 | *p_addr = &x; 9 | } 10 | 11 | int main() 12 | { 13 | int *n; 14 | int ret; 15 | 16 | f_stack(&n); 17 | 18 | n[0] = ret; /*temporal error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/4_ml.c: -------------------------------------------------------------------------------- 1 | /*Memory leaks.*/ 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int *m, *n, *r; 8 | int ret; 9 | 10 | m = malloc(sizeof(int)); 11 | n = malloc(sizeof(int)*5); 12 | free(n); 13 | 14 | r = n; 15 | n = m; 16 | m = r; 17 | 18 | printf("swap m n.\n"); 19 | 20 | n = NULL; /*memory leak*/ 21 | 22 | printf("terminating.\n"); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_id_1.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid dereference.*/ 2 | #include 3 | 4 | void foo() 5 | { 6 | printf("call foo.\n"); 7 | } 8 | 9 | int main() 10 | { 11 | char ch; 12 | void (*fp)() = foo; 13 | char *p = (char *)foo; 14 | 15 | (*fp)(); 16 | ch = *p; /*segment error*/ 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_id_1.w.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid dereference.*/ 2 | #include 3 | 4 | void foo() 5 | { 6 | printf("call foo.\n"); 7 | } 8 | 9 | int main() 10 | { 11 | char ch; 12 | void (*fp)() = foo; 13 | char *p = (char *)foo; 14 | 15 | (*fp)(); 16 | *p = ch; /*segment error*/ 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_id_1_2.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid dereference.*/ 2 | #include 3 | 4 | void foo() 5 | { 6 | printf("call foo.\n"); 7 | } 8 | 9 | char *func(char *s) 10 | { 11 | return s; 12 | } 13 | 14 | int main() 15 | { 16 | void (*p)() = foo; 17 | char *s = func(p); 18 | char ch = s[0]; /*segment error*/ 19 | 20 | return 0; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_id_2.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid dereference.*/ 2 | #include 3 | 4 | void foo() 5 | { 6 | printf("call foo.\n"); 7 | } 8 | 9 | int main() 10 | { 11 | char ch; 12 | char *p = &ch; 13 | void (*fp)() = (void (*)())p; 14 | 15 | (*fp)(); /*segment error*/ 16 | return 0; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_id_exploit.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid dereference - exploits.*/ 2 | #include 3 | #include 4 | 5 | /* On a secure system, this code should never be allowed to execute. 6 | Unfortunately, on an embedded system that shares code and data memory, 7 | it can be exploited to execute malious code on the stack. */ 8 | 9 | void print_nchars(char *s, int n) 10 | { 11 | for(int i = 0; i < n; i++) 12 | printf("%c", s[i]); 13 | } 14 | 15 | void print_secret() 16 | { 17 | printf("secret info\n"); 18 | } 19 | 20 | int main() 21 | { 22 | int a[1000]; 23 | memcpy(a, print_secret, 1000); /* or input malious code */ 24 | 25 | int (*fp)() = (int (*)())a; 26 | (*fp)(); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_if_1.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid free.*/ 2 | #include 3 | 4 | int main() 5 | { 6 | int x, *p1, *p2; 7 | 8 | p1 = &x; 9 | p2 = p1; 10 | free(p2); /*segment error*/ 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/5_segment_if_2.c: -------------------------------------------------------------------------------- 1 | /*Segment errors: invalid free.*/ 2 | #include 3 | 4 | void f_stack(int **p_addr) 5 | { 6 | int x; 7 | *p_addr = &x; 8 | } 9 | 10 | int main() 11 | { 12 | int *p1, *p2; 13 | 14 | f_stack(&p1); 15 | p2 = p1; 16 | free(p2); /*segment error*/ 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wf_stdlib_free.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions in stdlib.h: free.*/ 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int *n, *r; 8 | int ret; 9 | 10 | n = malloc(sizeof(int)*5); 11 | r = n + 1; 12 | 13 | free(r); /*spatial error*/ 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wf_stdlib_malloc.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions in stdlib.h: malloc.*/ 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int *n, *r; 8 | int ret; 9 | 10 | n = malloc(sizeof(int)*5); 11 | r = n; 12 | 13 | ret = r[4]; 14 | ret = *(r+5); /*spatial error*/ 15 | 16 | free(n); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wf_string.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions in string.h.*/ 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | char *str1 = "sky2098"; 8 | char *str2 = (char*)malloc(sizeof(char) * 10); 9 | str2[0] = '\0'; 10 | 11 | str2 = strcat(str2, "abc"); 12 | str2 = strcat(str2, str1); /*str2 spatial error*/ 13 | 14 | free(str2); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wfv_stdio_printf_1.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions (variadic) in stdio.h: printf.*/ 2 | #include 3 | #include 4 | 5 | void f(char *p) 6 | { 7 | free(p); 8 | } 9 | 10 | int main() 11 | { 12 | int i = 0; 13 | char *str1 = "Hello"; 14 | char *str2 = (char *)malloc(10); 15 | str2[0] = '\0'; 16 | f(str2); 17 | 18 | printf("%d %s\n", i, str1+10); /*spatial error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wfv_stdio_printf_2.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions (variadic) in stdio.h: printf.*/ 2 | #include 3 | #include 4 | 5 | void f(char *p) 6 | { 7 | free(p); 8 | } 9 | 10 | int main() 11 | { 12 | int i = 0; 13 | char *str1 = "Hello"; 14 | char *str2 = (char *)malloc(10); 15 | str2[0] = '\0'; 16 | f(str2); 17 | 18 | printf("%d %s %s\n", i, str1, str2); /*str2 temporal error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/all-mem-err/s3_wfv_stdio_sscanf.c: -------------------------------------------------------------------------------- 1 | /*Wrapper functions (variadic) in stdio.h: sscanf.*/ 2 | #include 3 | 4 | int main() 5 | { 6 | int i; 7 | char ch; 8 | 9 | sscanf("1 0\n", "%d %d", &i, (int*)&ch); /*&ch spatial error*/ 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_ph_vh.c: -------------------------------------------------------------------------------- 1 | /*Pointers (heap) pointing to 2 | variables (heap).*/ 3 | #include 4 | #include 5 | 6 | struct node { 7 | int value; 8 | struct node *next; 9 | }; 10 | 11 | struct node *create_node(int value) { 12 | struct node *node = (struct node *)malloc(sizeof(struct node)); 13 | node->value = value; 14 | node->next = NULL; 15 | return node; 16 | } 17 | 18 | struct node *create() { 19 | int i = 0; 20 | struct node *head, *p; 21 | head = p = create_node(i); 22 | for (i = 1; i < 10; i++) { 23 | p->next = create_node(i); 24 | printf("created node %d: %d\n", i, p->next->value); 25 | p = p->next; 26 | } 27 | return head; 28 | } 29 | 30 | void remove_list(struct node *head) { 31 | if(head == NULL) return; 32 | if(head->next != NULL) 33 | { 34 | remove_list(head->next); 35 | head->next = NULL; 36 | } 37 | free(head); 38 | } 39 | 40 | int main() 41 | { 42 | int ret; 43 | struct node *head = create(); 44 | 45 | remove_list(head->next); 46 | ret = head->next->value; /*temporal error*/ 47 | head->next = NULL; 48 | remove_list(head); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_3_func_call.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | function return values.*/ 3 | 4 | int a[2] = {1, 2}; 5 | 6 | int *f1() 7 | { 8 | return a; 9 | } 10 | 11 | int main() 12 | { 13 | int ret; 14 | 15 | int *p = f1(); 16 | 17 | ret = *p; 18 | ret = p[1]; 19 | ret = *(p+2); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_4_va_arg_call-ok.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | va_arg() function return values.*/ 3 | 4 | int a[2] = {1, 2}; 5 | 6 | #include 7 | int *vfunc(int n, ...) 8 | { 9 | int *vp[3]; 10 | int i; 11 | 12 | va_list arg; 13 | va_start(arg, n); 14 | for(i=0; i<3; i++) 15 | vp[i] = va_arg(arg, int*); 16 | va_end(arg); 17 | 18 | return vp[n]; 19 | } 20 | 21 | int main() 22 | { 23 | int ret; 24 | 25 | int *p; 26 | 27 | p = vfunc(2, a, &a, &a[1]); 28 | ret = *p; 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_4_va_arg_call.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | va_arg() function return values.*/ 3 | 4 | int a[2] = {1, 2}; 5 | 6 | #include 7 | int *vfunc(int n, ...) 8 | { 9 | int *vp[3]; 10 | int i; 11 | 12 | va_list arg; 13 | va_start(arg, n); 14 | for(i=0; i<3; i++) 15 | vp[i] = va_arg(arg, int*); 16 | va_end(arg); 17 | 18 | return vp[n]; 19 | } 20 | 21 | int main() 22 | { 23 | int ret; 24 | 25 | int *p; 26 | 27 | p = vfunc(2, a, &a, &a[1]); 28 | ret = p[1]; /*spatial error*/ 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_5_cond_expr.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | conditional expressions.*/ 3 | 4 | int a[2] = {1, 2}; 5 | int *pa = a; 6 | 7 | int main() 8 | { 9 | int ret; 10 | 11 | int *p; 12 | 13 | p = a==pa ? a:a+1; 14 | ret = *p; 15 | ret = p[1]; 16 | 17 | p = pa==0 ? a:++pa; 18 | ret = *p; 19 | ret = p[1]; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cai_1.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (arrays of integers).*/ 3 | 4 | int main() 5 | { 6 | int ret; 7 | 8 | int a1[2] = {1,2}; 9 | int *p1; 10 | 11 | /*one dimensional*/ 12 | p1 = a1; 13 | ret = p1[1]; 14 | ret = *(p1 + 2); /*spatial error*/ 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cai_2.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (arrays of integers).*/ 3 | 4 | int main() 5 | { 6 | int ret; 7 | 8 | int a2[2][3] = {5,6,7,8,9}; 9 | int (*p2)[3]; 10 | 11 | /*two dimensional*/ 12 | p2 = a2+1; 13 | ret = p2[0][0]; 14 | ret = p2[0][3]; /*spatial error*/ 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cai_s.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (arrays of integers in structs).*/ 3 | 4 | struct st 5 | { 6 | int a1[2]; 7 | int a2[2][3]; 8 | }; 9 | 10 | int main() 11 | { 12 | int ret; 13 | 14 | struct st s; 15 | int *p1; 16 | 17 | /*one dimensional*/ 18 | p1 = s.a1; 19 | ret = p1[0]; 20 | ret = *(p1+8); /*spatial error*/ 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cf.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (function).*/ 3 | #include 4 | 5 | void foo() 6 | { 7 | printf("call foo.\n"); 8 | } 9 | 10 | int main() 11 | { 12 | int *p1 = (int *)foo; 13 | int *p2 = p1 + 1; 14 | void (*p3)() = (void (*)())p1; 15 | void (*p4)() = (void (*)())p2; 16 | 17 | p3(); 18 | (*p4)(); /*spatial error*/ 19 | 20 | return 0; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cp-ok.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (manufactured pointers).*/ 3 | 4 | int main() 5 | { 6 | int *p; 7 | unsigned long i, addr = (unsigned long)&i; 8 | 9 | p = (int *)addr; 10 | i = *p; 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cp.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (manufactured pointers).*/ 3 | 4 | int main() 5 | { 6 | unsigned long *p; 7 | unsigned long i, addr = (unsigned long)&i; 8 | 9 | p = (unsigned long *)addr; 10 | i = *(p+1); /*spatial error*/ 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_cs.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | constants (strings).*/ 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | char c; 7 | 8 | char *str = "a"; 9 | 10 | c = *str; 11 | c = *(str+1); 12 | c = *(str+2); /*spatial error*/ 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vg.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (global).*/ 3 | 4 | struct { 5 | int i; 6 | int j; 7 | } st; 8 | 9 | int main() 10 | { 11 | int ret; 12 | 13 | int *p1; 14 | 15 | p1 = (int*)&st; 16 | ret = *p1; 17 | ret = p1[1]; 18 | ret = p1[2]; /*spatial error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vg.w.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (global).*/ 3 | 4 | struct { 5 | int i; 6 | int j; 7 | } st; 8 | 9 | int main() 10 | { 11 | int ret; 12 | 13 | int *p1; 14 | 15 | p1 = (int*)&st; 16 | p1[2] = ret; /*spatial error*/ 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vh.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (heap).*/ 3 | 4 | #include 5 | 6 | int *malloc_int(int x) 7 | { 8 | return (int*)malloc(x*sizeof(int)); 9 | } 10 | 11 | void allocate(int **addr) 12 | { 13 | *addr = malloc_int(2); 14 | } 15 | 16 | int main() 17 | { 18 | int lhs; 19 | 20 | int *p1; 21 | 22 | allocate(&p1); 23 | lhs = *p1; 24 | lhs = p1[1]; 25 | lhs = p1[2]; /*spatial error*/ 26 | 27 | free(p1); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vsk.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (stack).*/ 3 | 4 | int main() 5 | { 6 | int ret; 7 | 8 | int *p = &ret; 9 | 10 | ret = *(p+1); /*spatial error*/ 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vsk.w.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (stack).*/ 3 | 4 | void f_stack(int **p_addr) 5 | { 6 | int x; 7 | *p_addr = &x; 8 | } 9 | 10 | int main() 11 | { 12 | int ret; 13 | 14 | int *p; 15 | 16 | f_stack(&p); 17 | *p = ret; /*temporal error*/ 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/2_psk_vst.c: -------------------------------------------------------------------------------- 1 | /*Pointers (stack) pointing to 2 | variables (static).*/ 3 | 4 | void f_static(int **p_addr) 5 | { 6 | static int x; 7 | *p_addr = &x; 8 | } 9 | 10 | int main() 11 | { 12 | int ret; 13 | 14 | int *p; 15 | 16 | f_static(&p); 17 | ret = *p; 18 | ret = p[1]; /*spatial error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_1p_1.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointer values).*/ 2 | 3 | int *f_p(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | int i = 0, j = 1, k = 2; 12 | int *p1 = &i, *p2 = &j, *p3 = &k; 13 | int array[10]; 14 | 15 | int *a[4][3] = {p1, p2+1, ++p3, 16 | array, &j, &k, 17 | f_p(array), f_p(&j), f_p(p1)}; 18 | 19 | ret = a[0][0][0]; 20 | ret = a[0][0][1]; /*spatial error*/ 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_1p_2.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointer values).*/ 2 | 3 | int *f_p(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | int i = 0, j = 1, k = 2; 12 | int *p1 = &i, *p2 = &j, *p3 = &k; 13 | int array[10]; 14 | 15 | int *a[4][3] = {p1, p2+1, ++p3, 16 | array, &j, &k, 17 | f_p(array), f_p(&j), f_p(p1)}; 18 | 19 | ret = a[1][0][9]; 20 | ret = a[1][0][10]; /*spatial error*/ 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_2s.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (structure values).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int *f_p(int *ptr) 9 | { 10 | return ptr; 11 | } 12 | 13 | int main() 14 | { 15 | int ret; 16 | int i = 0, j = 1, k = 2; 17 | int *p1 = &i, *p2 = &j, *p3 = &k; 18 | int array[10]; 19 | 20 | st obj[4][3] = {{{0, p1}, {1, p2+1}, {2, ++p3}}, 21 | {{3, array}, {4, &j}, {5, &k}}, 22 | {{6, f_p(array)}, {7, f_p(&j)}, {8, f_p(p1)}} }; 23 | 24 | ret = obj[2][0].p[9]; 25 | ret = obj[2][0].p[10]; /*spatial error*/ 26 | 27 | return 0; 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_3fc_p.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (function return values: pointers).*/ 2 | 3 | int *f_p(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int *element_p2(int **ptr, int i) 9 | { 10 | return ptr[i]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret; 16 | int i = 0, j = 1, k = 2; 17 | int *p1 = &i, *p2 = &j, *p3 = &k; 18 | int array[10]; 19 | int *a[4][3] = {p1, p2+1, ++p3, 20 | array, &j, &k, 21 | f_p(array), f_p(&j), f_p(p1)}; 22 | int *ret_pi; 23 | 24 | ret_pi = element_p2((int**)a, 3); 25 | ret = *ret_pi; 26 | ret = *(ret_pi + 9); 27 | ret = ret_pi[10]; /*spatial error*/ 28 | 29 | return 0; 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_3fc_s.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (function return values: structures).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int *f_p(int *ptr) 9 | { 10 | return ptr; 11 | } 12 | 13 | st *element_st2(st (*ptr)[3], int i) 14 | { 15 | return ptr[i]; 16 | } 17 | 18 | int main() 19 | { 20 | int ret; 21 | int i = 0, j = 1, k = 2; 22 | int *p1 = &i, *p2 = &j, *p3 = &k; 23 | int array[10]; 24 | st obj[4][3] = {{{0, p1}, {1, p2+1}, {2, ++p3}}, 25 | {{3, array}, {4, &j}, {5, &k}}, 26 | {{6, f_p(array)}, {7, f_p(&j)}, {8, f_p(p1)}} }; 27 | st *ret_ps; 28 | 29 | ret_ps = element_st2(obj, 2); 30 | ret = *ret_ps->p; 31 | ret = *(ret_ps->p + 9); 32 | ret = ret_ps->p[10]; /*spatial error*/ 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_7r.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (register values).*/ 2 | 3 | int *f_p(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | int i = 0, j = 1, k = 2; 12 | register int *p1 = &i, *p2 = &j, *p3 = &k; 13 | int array[10]; 14 | 15 | int *a[4][3] = {p1, p2+1, ++p3, 16 | array, &j, &k, 17 | f_p(array), f_p(&j), f_p(p1)}; 18 | 19 | ret = *a[0][2]; /*spatial error*/ 20 | ret = a[0][2][-1]; 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_8gp-ok.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (global pointer values).*/ 2 | 3 | int g_i = 0, g_j = 1, g_k = 2; 4 | int g_array[10]; 5 | int *g_a[4][3] = {&g_i, &g_j+1, &g_k+1, 6 | g_array, &g_j, &g_k, 7 | g_array, &g_j, &g_k}; 8 | 9 | int main() 10 | { 11 | int ret; 12 | 13 | ret = g_a[1][0][9]; 14 | ret = g_a[1][1][0]; 15 | 16 | return 0; 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_8gp.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (global pointer values).*/ 2 | 3 | int g_i = 0, g_j = 1, g_k = 2; 4 | int g_array[10]; 5 | int *g_a[4][3] = {&g_i, &g_j+1, &g_k+1, 6 | g_array, &g_j, &g_k, 7 | g_array, &g_j, &g_k}; 8 | 9 | int main() 10 | { 11 | int ret; 12 | 13 | ret = g_a[1][0][9]; 14 | ret = g_a[1][0][10]; /*spatial error*/ 15 | 16 | return 0; 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_9gs-ok.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointers and structures).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int g_i = 0, g_j = 1, g_k = 2; 9 | int g_array[10]; 10 | 11 | st g_obj[4][3] = {{{0, &g_i}, {1, &g_j+1}, {2, &g_k+1}}, 12 | {{3, g_array}, {4, &g_j}, {5, &g_k}}, 13 | {{6, g_array}, {7, &g_j}, {8, &g_k}} }; 14 | 15 | int main() 16 | { 17 | int ret; 18 | 19 | ret = g_obj[0][1].p[-1]; 20 | 21 | return 0; 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_9gs.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointers and structures).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int g_i = 0, g_j = 1, g_k = 2; 9 | int g_array[10]; 10 | 11 | st g_obj[4][3] = {{{0, &g_i}, {1, &g_j+1}, {2, &g_k+1}}, 12 | {{3, g_array}, {4, &g_j}, {5, &g_k}}, 13 | {{6, g_array}, {7, &g_j}, {8, &g_k}} }; 14 | 15 | int main() 16 | { 17 | int ret; 18 | 19 | ret = *g_obj[0][1].p; /*spatial error*/ 20 | ret = g_obj[0][1].p[-1]; 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_9gs_2-ok.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointers and structures).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int g_i = 0, g_j = 1, g_k = 2; 9 | int g_array[10]; 10 | 11 | st g_obj[4][3] = {{{0, &g_i}, {1, &g_j+1}, {2, &g_k+1}}, 12 | {{3, g_array}, {4, &g_j}, {5, &g_k}}, 13 | {{6, g_array}, {7, &g_j}, {8, &g_k}} }; 14 | 15 | int main() 16 | { 17 | int ret; 18 | 19 | ret = g_obj[1][0].p[9]; 20 | ret = *g_obj[1][1].p; 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/3_def_a_9gs_2.c: -------------------------------------------------------------------------------- 1 | /*Definitions of arrays (pointers and structures).*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int *p; 6 | } st; 7 | 8 | int g_i = 0, g_j = 1, g_k = 2; 9 | int g_array[10]; 10 | 11 | st g_obj[4][3] = {{{0, &g_i}, {1, &g_j+1}, {2, &g_k+1}}, 12 | {{3, g_array}, {4, &g_j}, {5, &g_k}}, 13 | {{6, g_array}, {7, &g_j}, {8, &g_k}} }; 14 | 15 | int main() 16 | { 17 | int ret; 18 | 19 | ret = g_obj[1][0].p[10]; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_deref_3fc.c: -------------------------------------------------------------------------------- 1 | /*Dereferences.*/ 2 | 3 | int *func(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | 12 | ret = *func(&ret); 13 | ret = *func(&ret+1); /*spatial error*/ 14 | 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_deref_4va.c: -------------------------------------------------------------------------------- 1 | /*Dereferences.*/ 2 | 3 | #include 4 | void vfunc(int n, ...) 5 | { 6 | int ret; 7 | 8 | int i; 9 | va_list arg; 10 | va_start(arg, n); 11 | for(i=0; ii; 25 | ret = (sp1n+1)->i; 26 | ret = (sp1n+2)->i; /*spatial error*/ 27 | 28 | return 0; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_2c.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | int main() 16 | { 17 | int ret; 18 | st s2 = {2, 3, &s2-1}; 19 | st s1 = {0, 1, &s2}; 20 | stn sn1 = {s1, s2}; 21 | 22 | ret = ((st*)&sn1)->i; 23 | ret = ((st*)&sn1+1)->i; 24 | ret = ((st*)&sn1+2)->i; /*spatial error*/ 25 | 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_3fc.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | st *f(st *ptr) 16 | { 17 | return ptr; 18 | } 19 | 20 | int main() 21 | { 22 | int ret; 23 | st s2 = {2, 3, &s2-1}; 24 | st s1 = {0, 1, &s2}; 25 | stn sn1 = {s1, s2}; 26 | st *sp1n = (st*)&sn1; 27 | 28 | st *(*fp)(st *) = f; 29 | 30 | ret = (*fp)(sp1n)->i; 31 | ret = (fp(sp1n)+1)->i; 32 | ret = (fp(sp1n)+2)->i; /*spatial error*/ 33 | 34 | return 0; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_4va.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | #include 16 | void vfunc(int n, ...) 17 | { 18 | int ret; 19 | 20 | int i; 21 | va_list arg; 22 | va_start(arg, n); 23 | for(i=0; ii; /*spatial error*/ 25 | va_end(arg); 26 | } 27 | 28 | int main() 29 | { 30 | st s2 = {2, 3, &s2-1}; 31 | st s1 = {0, 1, &s2}; 32 | stn sn1 = {s1, s2}; 33 | st *sp1 = &s1; 34 | st *sp2 = (st*)&sn1+1; 35 | st *sp3 = (st*)&sn1+2; 36 | st *sp4 = &sn1.st2; 37 | 38 | vfunc(4, sp1, sp2, sp3, sp4); 39 | 40 | return 0; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_5ce.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | int main() 16 | { 17 | int ret; 18 | st s2 = {2, 3, &s2-1}; 19 | st s1 = {0, 1, &s2}; 20 | stn sn1 = {s1, s2}; 21 | st *sp1n = (st*)&sn1; 22 | 23 | ret = (sp1n!=0?sp1n++:++sp1n)->i; 24 | ret = (sp1n==(st*)&sn1?sp1n++:++sp1n)->i; /*spatial error*/ 25 | ret = (sp1n-1)->i; 26 | 27 | return 0; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_6se.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | int main() 16 | { 17 | int ret; 18 | st s2 = {2, 3, &s2-1}; 19 | st s1 = {0, 1, &s2}; 20 | int i = 0; 21 | 22 | st *sp1 = &s1; 23 | 24 | ret = (i++==0?sp1:++sp1)->i; 25 | ret = (++i==1?sp1:sp1++)->i; 26 | ret = (++i==3?sp1:sp1++)->i; /*spatial error*/ 27 | 28 | return 0; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_member_7r.c: -------------------------------------------------------------------------------- 1 | /*Member expressions.*/ 2 | 3 | typedef struct st { 4 | int i; 5 | int j; 6 | struct st *next; 7 | } st; 8 | 9 | /*nested structure type*/ 10 | typedef struct stn { 11 | st st1; 12 | st st2; 13 | } stn; 14 | 15 | int main() 16 | { 17 | int ret; 18 | st s2 = {2, 3, &s2-1}; 19 | st s1 = {0, 1, &s2}; 20 | stn sn1 = {s1, s2}; 21 | 22 | register st *sp1n = (st*)&sn1; 23 | 24 | ret = sp1n->i; 25 | ret = (sp1n+1)->i; 26 | ret = (sp1n+2)->i; /*spatial error*/ 27 | 28 | return 0; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_subscript_1v.c: -------------------------------------------------------------------------------- 1 | /*Subscripts.*/ 2 | 3 | int main() 4 | { 5 | int ret; 6 | int *p = &ret; 7 | 8 | ret = p[0]; 9 | ret = (++p)[0]; /*spatial error*/ 10 | 11 | return 0; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_subscript_2c.c: -------------------------------------------------------------------------------- 1 | /*Subscripts.*/ 2 | 3 | int main() 4 | { 5 | int ret; 6 | 7 | ret = "string literal"[0]; 8 | ret = "string literal"[20]; /*spatial error*/ 9 | 10 | return 0; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_subscript_3fc.c: -------------------------------------------------------------------------------- 1 | /*Subscripts.*/ 2 | 3 | int *func(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | 12 | ret = func(&ret)[0]; 13 | ret = func(&ret+1)[0]; /*spatial error*/ 14 | 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_subscript_3fpc.c: -------------------------------------------------------------------------------- 1 | /*Subscripts.*/ 2 | 3 | int *func(int *ptr) 4 | { 5 | return ptr; 6 | } 7 | 8 | int main() 9 | { 10 | int ret; 11 | int *(*fp)(int *) = func; 12 | int *p = &ret; 13 | 14 | ret = fp(p-1)[1]; 15 | ret = (1 + fp(p-1) + 1)[0]; /*spatial error*/ 16 | 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/4_subscript_4va.c: -------------------------------------------------------------------------------- 1 | /*Subscripts.*/ 2 | 3 | #include 4 | void vfunc(int n, ...) 5 | { 6 | int ret; 7 | 8 | int i; 9 | va_list arg; 10 | va_start(arg, n); 11 | for(i=0; i 10 | void vfunc(int n, ...) 11 | { 12 | int *p1, *p2, *p3, i; 13 | 14 | va_list arg; 15 | va_start(arg, n); 16 | p1 = get_p(va_arg(arg, int*)); 17 | p2 = get_p(va_arg(arg, int*)); 18 | p3 = get_p(va_arg(arg, int*)); 19 | i = p1[0]; 20 | i = p2[1]; /*spatial error*/ 21 | i = p3[0]; 22 | va_end(arg); 23 | } 24 | 25 | int main() 26 | { 27 | int ai[5]; 28 | vfunc(2, ai, ai+4, ai+4); 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_1v.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | int main() 32 | { 33 | st ret; 34 | 35 | int ai[5], i; 36 | char ac[5], c; 37 | double ad[5], d; 38 | st st1, st2; 39 | st1.p1 = ai; 40 | st1.p2 = (char*)∾ 41 | st1.p3 = &ad[0]; 42 | st2.p1 = st1.p1+4; 43 | st2.p2 = (char*)&ac+4; 44 | st2.p3 = &ad[0]+4; 45 | 46 | ret = get_st_i(1, st1, st2); 47 | i = ret.p1[0]; 48 | i = ret.p1[1]; /*spatial error*/ 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_3fc.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st get_st(st s) 32 | { 33 | return s; 34 | } 35 | 36 | int main() 37 | { 38 | st ret; 39 | 40 | int ai[5], i; 41 | char ac[5], c; 42 | double ad[5], d; 43 | st st1, st2; 44 | st1.p1 = ai; 45 | st1.p2 = (char*)∾ 46 | st1.p3 = &ad[0]; 47 | st2.p1 = st1.p1+4; 48 | st2.p2 = (char*)&ac+4; 49 | st2.p3 = &ad[0]+4; 50 | 51 | ret = get_st_i(1, get_st(st1), get_st(st2)); 52 | i = ret.p1[0]; 53 | i = ret.p1[1]; /*spatial error*/ 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_3fpc.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st get_st(st s) 32 | { 33 | return s; 34 | } 35 | 36 | st (*fp_st)(st) = get_st; 37 | 38 | int main() 39 | { 40 | st ret; 41 | 42 | int ai[5], i; 43 | char ac[5], c; 44 | double ad[5], d; 45 | st st1, st2; 46 | st1.p1 = ai; 47 | st1.p2 = (char*)∾ 48 | st1.p3 = &ad[0]; 49 | st2.p1 = st1.p1+4; 50 | st2.p2 = (char*)&ac+4; 51 | st2.p3 = &ad[0]+4; 52 | 53 | ret = get_st_i(1, fp_st(st1), fp_st(st2)); 54 | i = ret.p1[0]; 55 | i = ret.p1[1]; /*spatial error*/ 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_4va.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st get_st(st s) 32 | { 33 | return s; 34 | } 35 | 36 | #include 37 | void vfunc(int n, ...) 38 | { 39 | st ret, s1, s2; 40 | int i; 41 | char c; 42 | double d; 43 | 44 | va_list arg; 45 | va_start(arg, n); 46 | s1 = get_st(va_arg(arg, st)); 47 | s2 = get_st(va_arg(arg, st)); 48 | ret = get_st_i(n, s1, s2); 49 | i = ret.p1[0]; 50 | i = ret.p1[1]; /*spatial error*/ 51 | va_end(arg); 52 | } 53 | 54 | int main() 55 | { 56 | int ai[5]; 57 | char ac[5]; 58 | double ad[5]; 59 | 60 | st st1, st2; 61 | st1.p1 = ai; 62 | st1.p2 = (char*)∾ 63 | st1.p3 = &ad[0]; 64 | st2.p1 = st1.p1+4; 65 | st2.p2 = (char*)&ac+4; 66 | st2.p3 = &ad[0]+4; 67 | 68 | vfunc(1, st1, st2); 69 | 70 | return 0; 71 | } 72 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_5ce.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | int main() 32 | { 33 | st ret; 34 | 35 | int ai[5], i; 36 | char ac[5], c; 37 | double ad[5], d; 38 | st st1, st2; 39 | st1.p1 = ai; 40 | st1.p2 = (char*)∾ 41 | st1.p3 = &ad[0]; 42 | st2.p1 = st1.p1+4; 43 | st2.p2 = (char*)&ac+4; 44 | st2.p3 = &ad[0]+4; 45 | 46 | ret = get_st_i(1, st1.p1?st1:st2, st2.p1?st2:st1); 47 | i = ret.p1[0]; 48 | i = ret.p1[1]; /*spatial error*/ 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_s_7r.c: -------------------------------------------------------------------------------- 1 | /*Function calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | int main() 32 | { 33 | register st ret; 34 | 35 | int ai[5], i; 36 | char ac[5], c; 37 | double ad[5], d; 38 | register st st1, st2; 39 | st1.p1 = ai; 40 | st1.p2 = (char*)∾ 41 | st1.p3 = &ad[0]; 42 | st2.p1 = st1.p1+4; 43 | st2.p2 = (char*)&ac+4; 44 | st2.p3 = &ad[0]+4; 45 | 46 | ret = get_st_i(1, st1, st2); 47 | i = ret.p1[0]; 48 | i = ret.p1[1]; /*spatial error*/ 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_v_p_1v-ok.c: -------------------------------------------------------------------------------- 1 | /*Function calls to variadic functions, with 2 | pointer parameters.*/ 3 | 4 | #include 5 | void *vfunc(int n, ...) 6 | { 7 | int i; 8 | void *p; 9 | 10 | va_list arg; 11 | va_start(arg, n); 12 | for(i = 1; i <= n; i++) 13 | { 14 | p = va_arg(arg, void*); 15 | } 16 | va_end(arg); 17 | 18 | return p; 19 | } 20 | 21 | int main() 22 | { 23 | char *ret, ch; 24 | 25 | char str[20] = "string literal"; 26 | char *p1 = str; 27 | 28 | ret = (char*)vfunc(2, p1, p1+10); 29 | ch = ret[9]; 30 | 31 | return 0; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_v_p_1v.c: -------------------------------------------------------------------------------- 1 | /*Function calls to variadic functions, with 2 | pointer parameters.*/ 3 | 4 | #include 5 | void *vfunc(int n, ...) 6 | { 7 | int i; 8 | void *p; 9 | 10 | va_list arg; 11 | va_start(arg, n); 12 | for(i = 1; i <= n; i++) 13 | { 14 | p = va_arg(arg, void*); 15 | } 16 | va_end(arg); 17 | 18 | return p; 19 | } 20 | 21 | int main() 22 | { 23 | char *ret, ch; 24 | 25 | char str[20] = "string literal"; 26 | char *p1 = str; 27 | 28 | ret = (char*)vfunc(2, p1, p1+10); 29 | ch = ret[9]; 30 | ch = ret[10]; /*spatial error*/ 31 | 32 | return 0; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_v_p_2c.c: -------------------------------------------------------------------------------- 1 | /*Function calls to variadic functions, with 2 | pointer parameters.*/ 3 | 4 | #include 5 | void *vfunc(int n, ...) 6 | { 7 | int i; 8 | void *p; 9 | 10 | va_list arg; 11 | va_start(arg, n); 12 | for(i = 1; i <= n; i++) 13 | { 14 | p = va_arg(arg, void*); 15 | } 16 | va_end(arg); 17 | 18 | return p; 19 | } 20 | 21 | int main() 22 | { 23 | char *ret, ch; 24 | 25 | char str[20] = "string literal"; 26 | 27 | ret = (char*)vfunc(2, str, str+10); 28 | ch = ret[9]; 29 | ch = ret[10]; /*spatial error*/ 30 | 31 | return 0; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_v_p_3fc.c: -------------------------------------------------------------------------------- 1 | /*Function calls to variadic functions, with 2 | pointer parameters.*/ 3 | 4 | #include 5 | void *vfunc(int n, ...) 6 | { 7 | int i; 8 | void *p; 9 | 10 | va_list arg; 11 | va_start(arg, n); 12 | for(i = 1; i <= n; i++) 13 | { 14 | p = va_arg(arg, void*); 15 | } 16 | va_end(arg); 17 | 18 | return p; 19 | } 20 | 21 | char *get_char(char *p) 22 | { 23 | return p; 24 | } 25 | 26 | int main() 27 | { 28 | char *ret, ch; 29 | 30 | char str[20] = "string literal"; 31 | char *p1 = str; 32 | 33 | ret = (char*)vfunc(2, get_char(p1), get_char(p1+10)); 34 | ch = ret[9]; 35 | ch = ret[10]; /*spatial error*/ 36 | 37 | return 0; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fc_v_p_7r.c: -------------------------------------------------------------------------------- 1 | /*Function calls to variadic functions, with 2 | pointer parameters.*/ 3 | 4 | #include 5 | void *vfunc(int n, ...) 6 | { 7 | int i; 8 | void *p; 9 | 10 | va_list arg; 11 | va_start(arg, n); 12 | for(i = 1; i <= n; i++) 13 | { 14 | p = va_arg(arg, void*); 15 | } 16 | va_end(arg); 17 | 18 | return p; 19 | } 20 | 21 | int main() 22 | { 23 | char *ret, ch; 24 | 25 | char str[20] = "string literal"; 26 | register char *p1 = str; 27 | 28 | ret = (char*)vfunc(2, p1, p1+10); 29 | ch = ret[9]; 30 | ch = ret[10]; /*spatial error*/ 31 | 32 | return 0; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fpc_p_s_1v.c: -------------------------------------------------------------------------------- 1 | /*Function pointer (with parameters) calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st (*fp)(int, st, st) = get_st_i; 32 | 33 | int main() 34 | { 35 | st ret; 36 | 37 | int ai[5], i; 38 | char ac[5], c; 39 | double ad[5], d; 40 | st st1, st2; 41 | st1.p1 = ai; 42 | st1.p2 = (char*)∾ 43 | st1.p3 = &ad[0]; 44 | st2.p1 = st1.p1+4; 45 | st2.p2 = (char*)∾ 46 | st2.p3 = &ad[0]; 47 | 48 | ret = fp(1, st1, st2); 49 | i = ret.p1[0]; 50 | i = ret.p1[1]; /*spatial error*/ 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fpc_p_s_3fc.c: -------------------------------------------------------------------------------- 1 | /*Function pointer (with parameters) calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st (*fp)(int, st, st) = get_st_i; 32 | 33 | st get_st(st s) 34 | { 35 | return s; 36 | } 37 | 38 | st (*fp_st)(st) = get_st; 39 | 40 | int main() 41 | { 42 | st ret; 43 | 44 | int ai[5], i; 45 | char ac[5], c; 46 | double ad[5], d; 47 | st st1, st2; 48 | st1.p1 = ai; 49 | st1.p2 = (char*)∾ 50 | st1.p3 = &ad[0]; 51 | st2.p1 = st1.p1+4; 52 | st2.p2 = (char*)∾ 53 | st2.p3 = &ad[0]; 54 | 55 | ret = fp(1, fp_st(st1), fp_st(st2)); 56 | i = ret.p1[0]; 57 | i = ret.p1[1]; /*spatial error*/ 58 | 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fpc_p_s_4va.c: -------------------------------------------------------------------------------- 1 | /*Function pointer (with parameters) calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st (*fp)(int, st, st) = get_st_i; 32 | 33 | st get_st(st s) 34 | { 35 | return s; 36 | } 37 | 38 | st (*fp_st)(st) = get_st; 39 | 40 | #include 41 | void vfunc(int n, ...) 42 | { 43 | st ret, s1, s2; 44 | int i; 45 | char c; 46 | double d; 47 | 48 | va_list arg; 49 | va_start(arg, n); 50 | s1 = fp_st(va_arg(arg, st)); 51 | s2 = (*fp_st)(va_arg(arg, st)); 52 | ret = fp(n, s1, s2); 53 | i = ret.p1[0]; 54 | i = ret.p1[1]; /*spatial error*/ 55 | va_end(arg); 56 | } 57 | 58 | void (*fpv)(int, ...) = vfunc; 59 | 60 | int main() 61 | { 62 | int ai[5]; 63 | char ac[5]; 64 | double ad[5]; 65 | 66 | st st1, st2; 67 | st1.p1 = ai; 68 | st1.p2 = (char*)∾ 69 | st1.p3 = &ad[0]; 70 | st2.p1 = st1.p1+4; 71 | st2.p2 = (char*)∾ 72 | st2.p3 = &ad[0]; 73 | 74 | fpv(1, st1, st2); 75 | 76 | return 0; 77 | } 78 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fpc_p_s_5ce.c: -------------------------------------------------------------------------------- 1 | /*Function pointer (with parameters) calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st (*fp)(int, st, st) = get_st_i; 32 | 33 | int main() 34 | { 35 | st ret; 36 | 37 | int ai[5], i; 38 | char ac[5], c; 39 | double ad[5], d; 40 | st st1, st2; 41 | st1.p1 = ai; 42 | st1.p2 = (char*)∾ 43 | st1.p3 = &ad[0]; 44 | st2.p1 = st1.p1+4; 45 | st2.p2 = (char*)∾ 46 | st2.p3 = &ad[0]; 47 | 48 | ret = fp(1, st1.p1?st1:st2, st2.p1?st2:st1); 49 | i = ret.p1[0]; 50 | i = ret.p1[1]; /*spatial error*/ 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/c-syntax/5_fpc_p_s_7r.c: -------------------------------------------------------------------------------- 1 | /*Function pointer (with parameters) calls to non-variadic functions, with 2 | structure parameters.*/ 3 | 4 | typedef struct { 5 | int m1; 6 | int *p1; 7 | char m2; 8 | char *p2; 9 | double m3; 10 | double *p3; 11 | } st; 12 | 13 | st get_st_i(int index, st s1, st s2) 14 | { 15 | int i; 16 | char c; 17 | double d; 18 | 19 | i = *s1.p1; 20 | c = *s1.p2; 21 | d = *s1.p3; 22 | 23 | i = s2.p1[0]; 24 | c = s2.p2[0]; 25 | d = s2.p3[0]; 26 | 27 | if(index == 0) return s1; 28 | else return s2; 29 | } 30 | 31 | st (*fp)(int, st, st) = get_st_i; 32 | 33 | int main() 34 | { 35 | register st ret; 36 | 37 | int ai[5], i; 38 | char ac[5], c; 39 | double ad[5], d; 40 | register st st1, st2; 41 | st1.p1 = ai; 42 | st1.p2 = (char*)∾ 43 | st1.p3 = &ad[0]; 44 | st2.p1 = st1.p1+4; 45 | st2.p2 = (char*)∾ 46 | st2.p3 = &ad[0]; 47 | 48 | ret = fp(1, st1, st2); 49 | i = ret.p1[0]; 50 | i = ret.p1[1]; /*spatial error*/ 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vg-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vg.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | free(p); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | free(p); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | free(p); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vst-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vst.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/11_psk_vst.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | free(p); 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | if(i == (N-1)) ret = *(p+1); /*spatial error*/ 17 | free(p); 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | if(i == (N-1)) *(p+1) = ret; /*spatial error*/ 17 | free(p); 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | return; 15 | else check(p, n-1); /*recursive call*/ 16 | } 17 | 18 | int main() 19 | { 20 | int ret, *p; 21 | check(&p, N); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | { 15 | ret = *(*p+1); /*spatial error*/ 16 | return; 17 | } 18 | else check(p, n-1); /*recursive call*/ 19 | } 20 | 21 | int main() 22 | { 23 | int ret, *p; 24 | check(&p, N); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/1n_psk_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | { 15 | *(*p+1) = ret; /*spatial error*/ 16 | return; 17 | } 18 | else check(p, n-1); /*recursive call*/ 19 | } 20 | 21 | int main() 22 | { 23 | int ret, *p; 24 | check(&p, N); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vg-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vg.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | free(a); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | free(a); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | free(a); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vst-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | free(p); 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vst.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 24 | free(p); 25 | } 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/n1_ph_vst.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 24 | free(p); 25 | } 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | free(*p); 20 | } 21 | free(p); 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | if(i == (N-1) && j == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(*p); 21 | } 22 | free(p); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | if(i == (N-1) && j == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(*p); 21 | } 22 | free(p); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | return; 17 | else check(i, n-1); /*recursive call*/ 18 | } 19 | 20 | int main() 21 | { 22 | int ret; 23 | unsigned long i; 24 | for(i = 0; i < N; i++) 25 | { 26 | p = (int**)malloc(sizeof(int*)); 27 | check(i, N); 28 | free(p); 29 | } 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | { 17 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 18 | return; 19 | } 20 | else check(i, n-1); /*recursive call*/ 21 | } 22 | 23 | int main() 24 | { 25 | int ret; 26 | unsigned long i; 27 | for(i = 0; i < N; i++) 28 | { 29 | p = (int**)malloc(sizeof(int*)); 30 | check(i, N); 31 | free(p); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src/nptrs/nn_ph_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | { 17 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 18 | return; 19 | } 20 | else check(i, n-1); /*recursive call*/ 21 | } 22 | 23 | int main() 24 | { 25 | int ret; 26 | unsigned long i; 27 | for(i = 0; i < N; i++) 28 | { 29 | p = (int**)malloc(sizeof(int*)); 30 | check(i, N); 31 | free(p); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/src_makefiles/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := c-syntax all-mem-err nptrs 2 | SOURCES := $(sort $(wildcard $(patsubst %, %/*.c, $(DIRS)))) 3 | 4 | OBJS := $(patsubst %.c, %.o, $(SOURCES)) 5 | DEPS := $(patsubst %.c, %.d, $(SOURCES)) 6 | PROGS := $(patsubst %.c, %, $(SOURCES)) 7 | OUTPUTS := $(patsubst %.c, %.output.txt, $(SOURCES)) 8 | ERRORS := $(patsubst %.c, %.error.txt, $(SOURCES)) 9 | 10 | # Softboundcets crashes on instrumenting some programs. 11 | SOCETS_CRASHES := \ 12 | c-syntax/5_fc_s_3fpc.c \ 13 | c-syntax/5_fpc_p_s_1v.c \ 14 | c-syntax/5_fpc_p_s_3fc.c \ 15 | c-syntax/5_fpc_p_s_4va.c \ 16 | c-syntax/5_fpc_p_s_5ce.c \ 17 | c-syntax/5_fpc_p_s_7r.c 18 | 19 | .PHONY: build run clean 20 | # Ignore the runs that will cause errors. 21 | .IGNORE: $(patsubst %.c, %, $(SOCETS_CRASHES)) \ 22 | $(patsubst %.c, %.output.txt, $(SOURCES)) 23 | .SUFFIXES: # Delete the default suffixes 24 | 25 | CC := gcc -O3 26 | RM := rm 27 | 28 | build: $(PROGS) 29 | @echo "***Successfully built all benchmarks." 30 | 31 | $(PROGS): %: %.c 32 | @echo "Building" $@ 33 | $(INSTRU_CC) $< -o $@ 34 | 35 | run: $(OUTPUTS) 36 | @echo "***Successfully ran all benchmarks." 37 | 38 | $(OUTPUTS): %.output.txt: % 39 | @echo "Running" $< 40 | @/usr/bin/time $(INSTRU_BIN) $< > $@ 2> $<.error.txt 41 | @../../grep_time_mem.sh $<.error.txt 42 | 43 | clean: 44 | @$(RM) -f $(ERRORS) $(OUTPUTS) $(PROGS) $(DEPS) $(OBJS) 45 | -------------------------------------------------------------------------------- /benchmarks-memsafe/msbench/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := $(patsubst %, ../src/%, c-syntax all-mem-err nptrs) 2 | 3 | TOOLNAME := valgrind 4 | INSTRU_BIN = $(VALGD) 5 | 6 | ERROR_FILES = $(patsubst ../src/%.c, $(OUTPUT_DIR)/%.error.txt, \ 7 | $(sort $(wildcard $(patsubst %, %/*.c, $(DIRS))))) 8 | 9 | include ../../Makefile.default 10 | -------------------------------------------------------------------------------- /benchmarks-nptrs/Makefile: -------------------------------------------------------------------------------- 1 | # You can use one of the two following ways to init SOURCES. 2 | # 1. Search for all source files. 3 | SOURCES := $(sort $(shell ls src/*.c)) # a list of source files 4 | SOURCES := $(patsubst src/%, %, $(SOURCES)) # in the form *.c 5 | # 2. Designate a set of source files. 6 | # SOURCES := 11_psk_vg.c 11_psk_vst.c 7 | 8 | BUILDS := $(patsubst %.c, %/build, $(SOURCES)) 9 | RUNS := $(patsubst %.c, %/run, $(SOURCES)) 10 | CLEANS := $(patsubst %.c, %/clean, $(SOURCES)) 11 | PROGRMS := $(patsubst %.c, src/%, $(SOURCES)) 12 | OUTTXTS := $(patsubst %.c, src/%.output.txt, $(SOURCES)) 13 | 14 | .PHONY: build $(BUILDS) run $(RUNS) clean $(CLEANS) 15 | .SUFFIXES: # Delete the default suffixes 16 | 17 | build: $(BUILDS) 18 | @echo "***Successfully built all benchmarks." 19 | 20 | $(BUILDS): %/build: src/% 21 | 22 | $(PROGRMS): src/%: src/%.c 23 | @$(MAKE) -C src $(patsubst src/%, %, $@) --no-print-directory 24 | 25 | run: $(RUNS) 26 | @echo "***Successfully ran all benchmarks." 27 | 28 | $(RUNS): %/run: src/%.output.txt 29 | 30 | $(OUTTXTS): src/%.output.txt: src/% 31 | @$(MAKE) -C src $(patsubst src/%, %, $@) --no-print-directory 32 | 33 | clean: 34 | @$(MAKE) -C src clean 35 | 36 | $(CLEANS): 37 | @$(MAKE) -C src $@ --no-print-directory 38 | 39 | -include Makefile.inc.movec-memsafe 40 | 41 | -include Makefile.inc.addresssanitizer 42 | 43 | -include Makefile.inc.softboundcets 44 | 45 | -include Makefile.inc.valgrind 46 | -------------------------------------------------------------------------------- /benchmarks-nptrs/Makefile.inc.addresssanitizer: -------------------------------------------------------------------------------- 1 | OUTPUTS-addresssanitizer := $(patsubst %.c, %/output-addresssanitizer, $(SOURCES)) 2 | RUNS-addresssanitizer := $(patsubst %.c, %/run-addresssanitizer, $(SOURCES)) 3 | CLEANS-addresssanitizer := $(patsubst %.c, %/clean-addresssanitizer, $(SOURCES)) 4 | PROGRMS-addresssanitizer := $(patsubst %.c, output-addresssanitizer/%, $(SOURCES)) 5 | OUTTXTS-addresssanitizer := $(patsubst %.c, output-addresssanitizer/%.output.txt, $(SOURCES)) 6 | 7 | .PHONY: output-addresssanitizer $(OUTPUTS-addresssanitizer) run-addresssanitizer $(RUNS-addresssanitizer) clean-addresssanitizer $(CLEANS-addresssanitizer) 8 | 9 | output-addresssanitizer: $(OUTPUTS-addresssanitizer) 10 | @echo "***Successfully instrumented and built all benchmarks." 11 | 12 | $(OUTPUTS-addresssanitizer): %/output-addresssanitizer: output-addresssanitizer/% 13 | 14 | $(PROGRMS-addresssanitizer): output-addresssanitizer/%: src/%.c 15 | @$(MAKE) -C addresssanitizer $(patsubst %, ../%, $@) --no-print-directory 16 | 17 | run-addresssanitizer: $(RUNS-addresssanitizer) 18 | @echo "***Successfully ran all benchmarks." 19 | 20 | $(RUNS-addresssanitizer): %/run-addresssanitizer: output-addresssanitizer/%.output.txt 21 | 22 | $(OUTTXTS-addresssanitizer): output-addresssanitizer/%.output.txt: output-addresssanitizer/% 23 | @$(MAKE) -C addresssanitizer $(patsubst %, ../%, $@) --no-print-directory 24 | 25 | clean-addresssanitizer: 26 | @$(MAKE) -C addresssanitizer clean --no-print-directory 27 | 28 | $(CLEANS-addresssanitizer): 29 | @$(MAKE) -C addresssanitizer $(patsubst %-addresssanitizer, %, $@) --no-print-directory 30 | -------------------------------------------------------------------------------- /benchmarks-nptrs/Makefile.inc.movec-memsafe: -------------------------------------------------------------------------------- 1 | OUTPUTS-movec-memsafe := $(patsubst %.c, %/output-movec-memsafe, $(SOURCES)) 2 | RUNS-movec-memsafe := $(patsubst %.c, %/run-movec-memsafe, $(SOURCES)) 3 | CLEANS-movec-memsafe := $(patsubst %.c, %/clean-movec-memsafe, $(SOURCES)) 4 | PROGRMS-movec-memsafe := $(patsubst %.c, output-movec-memsafe/%, $(SOURCES)) 5 | OUTTXTS-movec-memsafe := $(patsubst %.c, output-movec-memsafe/%.output.txt, $(SOURCES)) 6 | 7 | .PHONY: output-movec-memsafe $(OUTPUTS-movec-memsafe) run-movec-memsafe $(RUNS-movec-memsafe) clean-movec-memsafe $(CLEANS-movec-memsafe) 8 | 9 | output-movec-memsafe: $(OUTPUTS-movec-memsafe) 10 | @echo "***Successfully instrumented and built all benchmarks." 11 | 12 | $(OUTPUTS-movec-memsafe): %/output-movec-memsafe: output-movec-memsafe/% 13 | 14 | $(PROGRMS-movec-memsafe): output-movec-memsafe/%: src/%.c 15 | @$(MAKE) -C movec-memsafe $(patsubst %, ../%, $@) --no-print-directory 16 | 17 | run-movec-memsafe: $(RUNS-movec-memsafe) 18 | @echo "***Successfully ran all benchmarks." 19 | 20 | $(RUNS-movec-memsafe): %/run-movec-memsafe: output-movec-memsafe/%.output.txt 21 | 22 | $(OUTTXTS-movec-memsafe): output-movec-memsafe/%.output.txt: output-movec-memsafe/% 23 | @$(MAKE) -C movec-memsafe $(patsubst %, ../%, $@) --no-print-directory 24 | 25 | clean-movec-memsafe: 26 | @$(MAKE) -C movec-memsafe clean --no-print-directory 27 | 28 | $(CLEANS-movec-memsafe): 29 | @$(MAKE) -C movec-memsafe $(patsubst %-movec-memsafe, %, $@) --no-print-directory 30 | -------------------------------------------------------------------------------- /benchmarks-nptrs/Makefile.inc.softboundcets: -------------------------------------------------------------------------------- 1 | OUTPUTS-softboundcets := $(patsubst %.c, %/output-softboundcets, $(SOURCES)) 2 | RUNS-softboundcets := $(patsubst %.c, %/run-softboundcets, $(SOURCES)) 3 | CLEANS-softboundcets := $(patsubst %.c, %/clean-softboundcets, $(SOURCES)) 4 | PROGRMS-softboundcets := $(patsubst %.c, output-softboundcets/%, $(SOURCES)) 5 | OUTTXTS-softboundcets := $(patsubst %.c, output-softboundcets/%.output.txt, $(SOURCES)) 6 | 7 | .PHONY: output-softboundcets $(OUTPUTS-softboundcets) run-softboundcets $(RUNS-softboundcets) clean-softboundcets $(CLEANS-softboundcets) 8 | 9 | output-softboundcets: $(OUTPUTS-softboundcets) 10 | @echo "***Successfully instrumented and built all benchmarks." 11 | 12 | $(OUTPUTS-softboundcets): %/output-softboundcets: output-softboundcets/% 13 | 14 | $(PROGRMS-softboundcets): output-softboundcets/%: src/%.c 15 | @$(MAKE) -C softboundcets $(patsubst %, ../%, $@) --no-print-directory 16 | 17 | run-softboundcets: $(RUNS-softboundcets) 18 | @echo "***Successfully ran all benchmarks." 19 | 20 | $(RUNS-softboundcets): %/run-softboundcets: output-softboundcets/%.output.txt 21 | 22 | $(OUTTXTS-softboundcets): output-softboundcets/%.output.txt: output-softboundcets/% 23 | @$(MAKE) -C softboundcets $(patsubst %, ../%, $@) --no-print-directory 24 | 25 | clean-softboundcets: 26 | @$(MAKE) -C softboundcets clean --no-print-directory 27 | 28 | $(CLEANS-softboundcets): 29 | @$(MAKE) -C softboundcets $(patsubst %-softboundcets, %, $@) --no-print-directory 30 | -------------------------------------------------------------------------------- /benchmarks-nptrs/Makefile.inc.valgrind: -------------------------------------------------------------------------------- 1 | OUTPUTS-valgrind := $(patsubst %.c, %/output-valgrind, $(SOURCES)) 2 | RUNS-valgrind := $(patsubst %.c, %/run-valgrind, $(SOURCES)) 3 | CLEANS-valgrind := $(patsubst %.c, %/clean-valgrind, $(SOURCES)) 4 | PROGRMS-valgrind := $(patsubst %.c, output-valgrind/%, $(SOURCES)) 5 | OUTTXTS-valgrind := $(patsubst %.c, output-valgrind/%.output.txt, $(SOURCES)) 6 | 7 | .PHONY: output-valgrind $(OUTPUTS-valgrind) run-valgrind $(RUNS-valgrind) clean-valgrind $(CLEANS-valgrind) 8 | 9 | output-valgrind: $(OUTPUTS-valgrind) 10 | @echo "***Successfully instrumented and built all benchmarks." 11 | 12 | $(OUTPUTS-valgrind): %/output-valgrind: output-valgrind/% 13 | 14 | $(PROGRMS-valgrind): output-valgrind/%: src/%.c 15 | @$(MAKE) -C valgrind $(patsubst %, ../%, $@) --no-print-directory 16 | 17 | run-valgrind: $(RUNS-valgrind) 18 | @echo "***Successfully ran all benchmarks." 19 | 20 | $(RUNS-valgrind): %/run-valgrind: output-valgrind/%.output.txt 21 | 22 | $(OUTTXTS-valgrind): output-valgrind/%.output.txt: output-valgrind/% 23 | @$(MAKE) -C valgrind $(patsubst %, ../%, $@) --no-print-directory 24 | 25 | clean-valgrind: 26 | @$(MAKE) -C valgrind clean --no-print-directory 27 | 28 | $(CLEANS-valgrind): 29 | @$(MAKE) -C valgrind $(patsubst %-valgrind, %, $@) --no-print-directory 30 | -------------------------------------------------------------------------------- /benchmarks-nptrs/addresssanitizer/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := addresssanitizer 2 | INSTRU_CC = $(ASAN) 3 | 4 | SOURCES := $(sort $(wildcard ../src/*.c)) 5 | SHOWTIME := YES 6 | 7 | include ../Makefile.default 8 | 9 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c $(OUTPUT_DIR) 10 | @echo "Instrumenting and Building" $@ 11 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $< -o $@ 12 | -------------------------------------------------------------------------------- /benchmarks-nptrs/grep_reported_errors.addresssanitizer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Grep the reported errors from the files in arguments. 3 | # Sum up the number of the reported errors. 4 | 5 | total_file=0; 6 | error_cnt=0; 7 | ml_cnt=0; 8 | empty_file=0; 9 | nonex_file=0; 10 | 11 | for file in $*; do 12 | total_file=$(expr ${total_file} + 1) 13 | if [ -s ${file} ]; then 14 | error=$(cat ${file} | grep "SUMMARY: AddressSanitizer:" | wc -l) 15 | ml=$(cat ${file} | grep "LeakSanitizer: detected memory leak" | wc -l) 16 | error_cnt=$(expr ${error_cnt} + ${error}) 17 | ml_cnt=$(expr ${ml_cnt} + ${ml}) 18 | elif [ -f ${file} ]; then 19 | empty_file=$(expr ${empty_file} + 1) 20 | else 21 | nonex_file=$(expr ${nonex_file} + 1) 22 | fi 23 | done 24 | 25 | if [ "${error_cnt}" != "0" ]; then 26 | msg=" ${error_cnt}"; 27 | if [ "${ml_cnt}" != "0" ]; then msg=${msg}" (ML=${ml_cnt})"; fi 28 | echo "#### Reported errors:${msg}" 29 | elif [ "${empty_file}" != "0" ]; then 30 | echo "#### No error is recorded." 31 | echo "#### You need to manually check"\ 32 | "as ${empty_file}/${total_file} output files are empty." 33 | else 34 | echo "#### No error is reported." 35 | fi 36 | if [ "${nonex_file}" != "0" ]; then 37 | echo "#### ${nonex_file}/${total_file} output files do not exist." 38 | fi 39 | 40 | # Write to the specified file. 41 | if [ -n "${BENCHMARK_TABLE_FILE}" ]; then 42 | echo -n "${msg}," >> ${BENCHMARK_TABLE_FILE} 43 | fi 44 | -------------------------------------------------------------------------------- /benchmarks-nptrs/grep_reported_errors.softboundcets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Grep the reported errors from the files in arguments. 3 | # Sum up the number of the reported errors. 4 | 5 | total_file=0; 6 | error_cnt=0; 7 | empty_file=0; 8 | nonex_file=0; 9 | 10 | for file in $*; do 11 | total_file=$(expr ${total_file} + 1) 12 | if [ -s ${file} ]; then 13 | error=$(cat ${file} | grep "Softboundcets: " | wc -l) 14 | error_cnt=$(expr ${error_cnt} + ${error}) 15 | elif [ -f ${file} ]; then 16 | empty_file=$(expr ${empty_file} + 1) 17 | else 18 | nonex_file=$(expr ${nonex_file} + 1) 19 | fi 20 | done 21 | 22 | if [ "${error_cnt}" != "0" ]; then 23 | echo "#### Reported errors: ${error_cnt}" 24 | elif [ "${empty_file}" != "0" ]; then 25 | echo "#### No error is recorded." 26 | echo "#### You need to manually check"\ 27 | "as ${empty_file}/${total_file} output files are empty." 28 | else 29 | echo "#### No error is reported." 30 | fi 31 | if [ "${nonex_file}" != "0" ]; then 32 | echo "#### ${nonex_file}/${total_file} output files do not exist." 33 | fi 34 | 35 | # Write to the specified file. 36 | if [ -n "${BENCHMARK_TABLE_FILE}" ]; then 37 | if [ "${error_cnt}" = "0" ]; then error_cnt=""; fi 38 | echo -n "${error_cnt}," >> ${BENCHMARK_TABLE_FILE} 39 | fi 40 | -------------------------------------------------------------------------------- /benchmarks-nptrs/grep_reported_errors.valgrind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Grep the reported errors from the files in arguments. 3 | # Sum up the number of the reported errors. 4 | 5 | total_file=0; 6 | error_cnt=0; 7 | empty_file=0; 8 | nonex_file=0; 9 | 10 | for file in $*; do 11 | total_file=$(expr ${total_file} + 1) 12 | if [ -s ${file} ]; then 13 | error=$(cat ${file} | grep "ERROR SUMMARY: ") 14 | error=${error#*ERROR SUMMARY: } 15 | error=${error%%errors*} 16 | error_cnt=$(expr ${error_cnt} + ${error}) 17 | elif [ -f ${file} ]; then 18 | empty_file=$(expr ${empty_file} + 1) 19 | else 20 | nonex_file=$(expr ${nonex_file} + 1) 21 | fi 22 | done 23 | 24 | if [ "${error_cnt}" != "0" ]; then 25 | echo "#### Reported errors: ${error_cnt}" 26 | elif [ "${empty_file}" != "0" ]; then 27 | echo "#### No error is recorded." 28 | echo "#### You need to manually check"\ 29 | "as ${empty_file}/${total_file} output files are empty." 30 | else 31 | echo "#### No error is reported." 32 | fi 33 | if [ "${nonex_file}" != "0" ]; then 34 | echo "#### ${nonex_file}/${total_file} output files do not exist." 35 | fi 36 | 37 | # Write to the specified file. 38 | if [ -n "${BENCHMARK_TABLE_FILE}" ]; then 39 | if [ "${error_cnt}" = "0" ]; then error_cnt=""; fi 40 | echo -n "${error_cnt}," >> ${BENCHMARK_TABLE_FILE} 41 | fi 42 | -------------------------------------------------------------------------------- /benchmarks-nptrs/movec-memsafe/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := movec-memsafe 2 | 3 | SOURCES := $(sort $(wildcard ../src/*.c)) 4 | SHOWTIME := YES 5 | 6 | include ../Makefile.default 7 | 8 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c $(OUTPUT_DIR) 9 | @echo "Instrumenting" $< 10 | $(MOVEC) --line-filename -c $< -o $@.c 11 | @echo "Building" $@ 12 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $@.c -o $@ 13 | -------------------------------------------------------------------------------- /benchmarks-nptrs/softboundcets/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := softboundcets 2 | INSTRU_CC = $(SOCETS) 3 | 4 | SOURCES := $(sort $(wildcard ../src/*.c)) 5 | SHOWTIME := YES 6 | 7 | include ../Makefile.default 8 | 9 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c $(OUTPUT_DIR) 10 | @echo "Instrumenting and Building" $@ 11 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $< -o $@ 12 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vg-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vg.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | free(p); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | free(p); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = a; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | free(p); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vst-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vst.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | ret = *(p+1); /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/11_psk_vst.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | static int a[100]; 10 | 11 | int ret, *p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = &a[i%100]; 16 | ret = *p; 17 | } 18 | 19 | *(p+1) = ret; /*spatial error*/ 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | free(p); 17 | } 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | if(i == (N-1)) ret = *(p+1); /*spatial error*/ 17 | free(p); 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, *p; 10 | unsigned long i; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int*)malloc(sizeof(int)); 14 | ret = *p; 15 | 16 | if(i == (N-1)) *(p+1) = ret; /*spatial error*/ 17 | free(p); 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | return; 15 | else check(p, n-1); /*recursive call*/ 16 | } 17 | 18 | int main() 19 | { 20 | int ret, *p; 21 | check(&p, N); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | { 15 | ret = *(*p+1); /*spatial error*/ 16 | return; 17 | } 18 | else check(p, n-1); /*recursive call*/ 19 | } 20 | 21 | int main() 22 | { 23 | int ret, *p; 24 | check(&p, N); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/1n_psk_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | void check(int **p, unsigned long n) 8 | { 9 | int ret; 10 | *p = &ret; 11 | ret = **p; 12 | 13 | if(n <= 1) 14 | { 15 | *(*p+1) = ret; /*spatial error*/ 16 | return; 17 | } 18 | else check(p, n-1); /*recursive call*/ 19 | } 20 | 21 | int main() 22 | { 23 | int ret, *p; 24 | check(&p, N); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vg-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vg.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int a[100]; 8 | 9 | int main() 10 | { 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | free(a); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | free(a); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int *a = (int*)malloc(sizeof(int)); 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = a; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | free(a); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | free(p); 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int main() 8 | { 9 | int a[100]; 10 | 11 | int ret, **p; 12 | unsigned long i; 13 | for(i = 0; i < N; i++) 14 | { 15 | p = (int**)malloc(sizeof(int*)); 16 | *p = &a[i%100]; 17 | ret = **p; 18 | 19 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(p); 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vst-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | free(p); 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vst.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 24 | free(p); 25 | } 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/n1_ph_vst.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 100000000 5 | #endif 6 | 7 | int *f(int i) 8 | { 9 | static int a[100]; 10 | return &a[i%100]; 11 | } 12 | 13 | int main() 14 | { 15 | int ret, **p; 16 | unsigned long i; 17 | for(i = 0; i < N; i++) 18 | { 19 | p = (int**)malloc(sizeof(int*)); 20 | *p = f(i); 21 | ret = **p; 22 | 23 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 24 | free(p); 25 | } 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vh-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | free(*p); 20 | } 21 | free(p); 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vh.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | if(i == (N-1) && j == (N-1)) ret = *(*p+1); /*spatial error*/ 20 | free(*p); 21 | } 22 | free(p); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vh.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int main() 8 | { 9 | int ret, **p; 10 | unsigned long i, j; 11 | for(i = 0; i < N; i++) 12 | { 13 | p = (int**)malloc(sizeof(int*)); 14 | for(j = 0; j < N; j++) 15 | { 16 | *p = (int*)malloc(sizeof(int)); 17 | ret = **p; 18 | 19 | if(i == (N-1) && j == (N-1)) *(*p+1) = ret; /*spatial error*/ 20 | free(*p); 21 | } 22 | free(p); 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vsk-ok.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | return; 17 | else check(i, n-1); /*recursive call*/ 18 | } 19 | 20 | int main() 21 | { 22 | int ret; 23 | unsigned long i; 24 | for(i = 0; i < N; i++) 25 | { 26 | p = (int**)malloc(sizeof(int*)); 27 | check(i, N); 28 | free(p); 29 | } 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vsk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | { 17 | if(i == (N-1)) ret = *(*p+1); /*spatial error*/ 18 | return; 19 | } 20 | else check(i, n-1); /*recursive call*/ 21 | } 22 | 23 | int main() 24 | { 25 | int ret; 26 | unsigned long i; 27 | for(i = 0; i < N; i++) 28 | { 29 | p = (int**)malloc(sizeof(int*)); 30 | check(i, N); 31 | free(p); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /benchmarks-nptrs/src/nn_ph_vsk.w.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef N 4 | #define N 10000 5 | #endif 6 | 7 | int **p; 8 | 9 | void check(unsigned long i, unsigned long n) 10 | { 11 | int ret; 12 | *p = &ret; 13 | ret = **p; 14 | 15 | if(n <= 1) 16 | { 17 | if(i == (N-1)) *(*p+1) = ret; /*spatial error*/ 18 | return; 19 | } 20 | else check(i, n-1); /*recursive call*/ 21 | } 22 | 23 | int main() 24 | { 25 | int ret; 26 | unsigned long i; 27 | for(i = 0; i < N; i++) 28 | { 29 | p = (int**)malloc(sizeof(int*)); 30 | check(i, N); 31 | free(p); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /benchmarks-nptrs/valgrind/Makefile: -------------------------------------------------------------------------------- 1 | TOOLNAME := valgrind 2 | INSTRU_BIN = $(VALGD) 3 | 4 | SOURCES := $(sort $(wildcard ../src/*.c)) 5 | SHOWTIME := YES 6 | 7 | include ../Makefile.default 8 | 9 | $(OUTPUT_PROGRAMS): $(OUTPUT_DIR)/%: ../src/%.c $(OUTPUT_DIR) 10 | @echo "Building" $@ 11 | $(INSTRU_CC) $(INSTRU_CC_OPTS) $< -o $@ 12 | -------------------------------------------------------------------------------- /bin/movec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzchen/movec/90d444fe9597abc1c756c6b134adaa9e0cadf77f/bin/movec -------------------------------------------------------------------------------- /examples/advice-call-multi-files/Makefile: -------------------------------------------------------------------------------- 1 | all: func.c main.c 2 | gcc $^ -o $@ 3 | 4 | clean: 5 | @rm -rf all a.out *1.c _RV_* *.json 6 | -------------------------------------------------------------------------------- /examples/advice-call-multi-files/aspect.mon: -------------------------------------------------------------------------------- 1 | monitor mon 2 | { 3 | pointcut call_f(a,b) = call(% f(% s : a, % i : b)); 4 | 5 | advice advb1(a1, b1) before call_f(a1, b1) { 6 | printf("before 1."); 7 | } 8 | 9 | advice adva1(a1, b1) after call_f(a1, b1) { 10 | printf("after 1.\n"); 11 | } 12 | 13 | advice advr1(a1, b1) around call_f(a1, b1) { 14 | printf("around 1."); 15 | proceed(); 16 | } 17 | 18 | advice advb2(a1, b1) before call_f(a1, b1) { 19 | printf("before 2."); 20 | } 21 | 22 | advice adva2(a1, b1) after call_f(a1, b1) { 23 | printf("after 2."); 24 | } 25 | 26 | advice advr2(a1, b1) around call_f(a1, b1) { 27 | printf("around 2."); 28 | proceed(); 29 | } 30 | 31 | advice advr3(a1, b1) around call_f(a1, b1) { 32 | printf("around 3."); 33 | proceed(); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /examples/advice-call-multi-files/func.c: -------------------------------------------------------------------------------- 1 | int f(char *s, int i) 2 | { 3 | return s[i]; 4 | } 5 | -------------------------------------------------------------------------------- /examples/advice-call-multi-files/header.h: -------------------------------------------------------------------------------- 1 | int f(char *s, int i); 2 | -------------------------------------------------------------------------------- /examples/advice-call-multi-files/main.c: -------------------------------------------------------------------------------- 1 | #include "header.h" 2 | 3 | int main() 4 | { 5 | char s[10] = ""; 6 | f(s, 1); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /examples/advice-call/aspect.mon: -------------------------------------------------------------------------------- 1 | monitor mon 2 | { 3 | pointcut call_f(a,b) = call(% f(% s : a, % i : b)); 4 | 5 | advice advb1(a1, b1) before call_f(a1, b1) { 6 | printf("before 1."); 7 | } 8 | 9 | advice adva1(a1, b1) after call_f(a1, b1) { 10 | printf("after 1.\n"); 11 | } 12 | 13 | advice advr1(a1, b1) around call_f(a1, b1) { 14 | printf("around 1."); 15 | proceed(); 16 | } 17 | 18 | advice advb2(a1, b1) before call_f(a1, b1) { 19 | printf("before 2."); 20 | } 21 | 22 | advice adva2(a1, b1) after call_f(a1, b1) { 23 | printf("after 2."); 24 | } 25 | 26 | advice advr2(a1, b1) around call_f(a1, b1) { 27 | printf("around 2."); 28 | proceed(); 29 | } 30 | 31 | advice advr3(a1, b1) around call_f(a1, b1) { 32 | printf("around 3."); 33 | proceed(); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /examples/advice-call/main.c: -------------------------------------------------------------------------------- 1 | int f(char *s, int i) 2 | { 3 | return s[i]; 4 | } 5 | 6 | int main() 7 | { 8 | char s[10] = ""; 9 | f(s, 1); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /examples/advice-get/aspect.mon: -------------------------------------------------------------------------------- 1 | monitor mon 2 | { 3 | pointcut get_v(x) = get(% v : x); 4 | 5 | advice advb1(a) before get_v(a) { 6 | printf("before 1."); 7 | } 8 | 9 | advice adva1(a) after get_v(a) { 10 | printf("after 1.\n"); 11 | } 12 | 13 | advice advr1(a) around get_v(a) { 14 | printf("around 1."); 15 | proceed(); 16 | } 17 | 18 | advice advb2(a) before get_v(a) { 19 | printf("before 2."); 20 | } 21 | 22 | advice adva2(a) after get_v(a) { 23 | printf("after 2."); 24 | } 25 | 26 | advice advr2(a) around get_v(a) { 27 | printf("around 2."); 28 | proceed(); 29 | } 30 | 31 | advice advr3(a) around get_v(a) { 32 | printf("around 3."); 33 | proceed(); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /examples/advice-get/main.c: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | int v, x; 4 | 5 | v = 0; 6 | 7 | x = v; 8 | 9 | v++; 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /examples/multi-files/Makefile: -------------------------------------------------------------------------------- 1 | all: foo.c func.c main.c 2 | gcc $^ -o $@ 3 | 4 | clean: 5 | @rm -rf all a.out *1.c *.json 6 | -------------------------------------------------------------------------------- /examples/multi-files/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void foo() 4 | { 5 | printf("call foo.\n"); 6 | } 7 | -------------------------------------------------------------------------------- /examples/multi-files/func.c: -------------------------------------------------------------------------------- 1 | char *func(char *c) 2 | { 3 | return c; 4 | } 5 | -------------------------------------------------------------------------------- /examples/multi-files/header.h: -------------------------------------------------------------------------------- 1 | void foo(); 2 | 3 | char *func(char *c); 4 | -------------------------------------------------------------------------------- /examples/multi-files/main.c: -------------------------------------------------------------------------------- 1 | /*Segment confusion errors: invalid dereference.*/ 2 | #include "header.h" 3 | 4 | int main() 5 | { 6 | void (*p)() = foo; 7 | char *s = func(p); 8 | char ch = s[0]; /*segment confusion error*/ 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /examples/segment.c: -------------------------------------------------------------------------------- 1 | /*Segment confusion errors: invalid dereference.*/ 2 | #include 3 | 4 | void foo() 5 | { 6 | printf("call foo.\n"); 7 | } 8 | 9 | char *func(char *c) 10 | { 11 | return c; 12 | } 13 | 14 | int main() 15 | { 16 | void (*p)() = foo; 17 | char *s = func(p); 18 | char ch = s[0]; /*segment confusion error*/ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /examples/subobject.c: -------------------------------------------------------------------------------- 1 | /*Sub-object overflow in stack.*/ 2 | 3 | typedef struct 4 | { 5 | int m1; 6 | int m2; 7 | } st; 8 | 9 | int main() 10 | { 11 | st s; 12 | int *p = &s.m1; 13 | p[1] = 0; /* spatial error */ 14 | return 0; 15 | } 16 | --------------------------------------------------------------------------------