I'm having a very tough time tracking down whatever is going wrong with my project, and I'm starting to suspect it may be an issue with gdc. I'd like to get tips on how to prove or disprove this.
I've compiled the project on four different computers. Two were windows, one was a mac, and on was an amd64x2. The latter two don't support dmd and so only gdc was used. Both windows boxes used dmd and one used gdc as well.
Both dmd compilations run without problem.
All three gdc compilations crash with platform specific errors.
amd64x2 (ubuntu 7.04) - segmentation fault
mac - bus error
windows - application error
I've done most of my debug effort on the amd64x2.
I caught the error in GDB a number of times. I had to go up the stack a few to get to my code, and when examining the code and the various variables it used, I could find nothing wrong.
While the literal crash occurred when leveraging a lot of code in the project, I was able to get valgrind to report an issue early on, and in the same module that eventually had the crash. I had thought I was on to something.
Using valgrind as a guide, I boiled a unit test down to the following:
T a = new T();
T b = a.dup; // My own dup command
b = a.dup;
When I ran valgrind, it did not find anything wrong with a.dup the first time, but the second a.dup generated lots of "execution based on uninitialized memory" errors (or something worded very similarly). The module was almost 100% detachable and so I copied the entire file, added a main and disabled one import. When the modified file was run through valgrind again, no warnings or errors of any kind were generated.
I can provide extra detail, included instructions on obtaining, building, and executing the project if desired.
I'm at a loss as to how to track this down further. Please let me know what I should do next.
Log in to post a comment.