Exploit databaseDownload repository ZIP
GH-60fecc11c1545e789ebd2d9c0103c2df
915425297/cves
Sources for CVE-2018-10933
36 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files24
915425297/cvesRevision 649247302201
- ↑..Parent directory
- final project/
- Makefile
- bmp.cpp
- bmp.h
- declarations.h
- mandelbrot-main.cpp
- mandelbrot.cpp
- mandelbrot.h
- mv-mult-main.cpp
- mv-mult.cpp
- mv-mult.h
- partners.txt
- t1-main.c
- t1.c
- t2-main.c
- t2.c
- t3-main.c
- t3.c
- t4-main.c
- t4.c
- t5-main.c
- t5.c
- t6-main.c
- t6.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
Lab14/t1-main.c
C · 856 bytes#include "declarations.h"
#ifdef SCALAR
void
t1(float *A, float *B) {
for (int nl = 0; nl < 1000000; nl ++) {
for (int i = 0; i < LEN1; i += 2) {
A[i + 1] = (A[i] + B[i]) / (A[i] + B[i] + 1.);
}
B[0] ++;
}
}
#endif
int
main() {
float *A = (float *) _mm_malloc(LEN1 * sizeof(float), 16);
float *B = (float *) _mm_malloc(LEN1 * sizeof(float), 16);
for (int i = 0; i < LEN1; i ++) {
A[i] = 1. / (i + 1);
B[i] = 2. / (i + 1);
}
unsigned long long start_c, end_c, diff_c;
start_c = __rdtsc();
t1(A, B);
end_c = __rdtsc();
diff_c = end_c - start_c;
float giga_cycle = diff_c / 1000000000.0;
float ret = 0;
for (int i = 0; i < LEN1; i ++) {
ret += A[i];
}
printf("t1 took %f giga cycles and the result is: %f\n", giga_cycle, ret);
}