-
-
Save hacst/44cd56f42db329be1ef8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build x64 version with "cl -O2 /fp:fast crash.c" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
struct TonalityAnalysis { | |
int count[2]; //< Remove this or change it to multiples of 4 and it works | |
float std[4]; | |
}; | |
int main() { | |
int i; | |
struct TonalityAnalysis *tonal = (struct TonalityAnalysis*)calloc(1, sizeof(struct TonalityAnalysis)); | |
float features[4]; | |
for (i = 0; i<4; i++) | |
features[i] = (float) sqrt(tonal->std[i]); //< Crash here | |
for (i = 0; i<4; i++) | |
printf("%.2f\n", features[i]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment