Closed gui11aume closed 10 years ago
No problem when compiling with gcc-4.7 (the oldest on my machine).
I could not reproduce the issue when compiling with gcc 4.4.6 and gcc 3.4.6 on the cluster of the CRG. Not sure that the issue is really due to the version of gcc.
Looking at the architecture-dependent parts of the code, I realized that the content of the file getline.c is not linked properly. This may be the source of the trouble.
It seems the bug has nothing to do with getline.c. Using binaries compiled by Lucas on the cluster of the UPF I could reproduce the bug. However, running the binaries in gdb makes the bug disappear completely. This is most likely a thread issue, which for some reason arises only when compiled with older versions of gcc.
This is 99% an issue that has to do with the version of glibc rather than the compiler version. From pthreads manpage:
NPTL (Native POSIX Threads Library) This is the modern Pthreads implementation. By comparison with LinuxThreads, NPTL provides closer conformance to the requirements of the POSIX.1 specification and better performance when creating large numbers of threads. NPTL is available since glibc 2.3.2, and requires features that are present in the Linux 2.6 kernel.
Did you check the version of glibc?
Eduard
2014-09-08 23:26 GMT+02:00 Guillaume Filion notifications@github.com:
Assigned #5 https://github.com/gui11aume/starcode/issues/5 to @ezorita https://github.com/ezorita.
— Reply to this email directly or view it on GitHub https://github.com/gui11aume/starcode/issues/5#event-162751763.
The bug is in pad_useq(), on line 745 of starcode.c in commit 2655576302...
After compiling wigh gcc 4.4.6 on RedHat, running starcode on the test_file in the test directory gives variable results, none of them being correct. This was done on the cluster of the UPF. When recompiling with gcc 4.8.2 the problem was solved and starcode gave the expected result.