Closed coen22 closed 7 years ago
What does your directory tree look like? I ask this because I was getting segmentation faults due to there being .DS_Store files within my code and meta folders.
makefst [args] dir/ and then I have dir/code, dir/meta, and dir/content I'll check if there is any hidden files
No, not a single hidden file
Not sure if you're still looking, but I just discovered the same issue. In this case, I would assume that you built makefst using the Xcode Command Line tools.
After learning how to debug software using the LLVM debugger, I found the issue.
The function "strcpy" takes a string from a source buffer and copies it to a destination buffer. In this case, the source and destination buffers overlap, which according to the International Organisation for Standardization, is "undefined behaviour."
On Linux (and probably Windows) this still works, because the source buffer starts after the destination buffer, and so won't cause any issues.
But Apple's implementation of the C standard library detects that the buffers overlap, and aborts.
I will push a fork that fixes this issue shortly, however I'll need someone on a Linux/Windows system to check that my changes still work.
At this point in the code, the program exits with error abort trap: 6
//Strip path from contents strcpy(out_dirs[i], strstr(out_dirs[i], dir) + strlen(dir) + 1);
I compiled it on mac, after creating the makefile with cmake