libcheck / check

A unit testing framework for C
GNU Lesser General Public License v2.1
1.07k stars 210 forks source link

mingw-w64+msys: several of our tests are failing because of internal check error #295

Open vtorri opened 4 years ago

vtorri commented 4 years ago

Windows, msys2+mingw-w64 : several of our tests (18 over 36) are failing because of that error:

check_pack.c:346: Error in call to fread: Bad file descriptor

any idea of the problem ?

brarcher commented 4 years ago

Does the issue happen consistently or is it sporadic? I've not seen the issue myself, and the MSYS2 and mingw64msys tests run on GitHub Actions have not noticed anything. I'll not be able to reproduce it locally as I'm without a Windows machine. Is there any other information you could provide which could be helpful?

vtorri commented 4 years ago

we have 36 libraries, in which we have unit tests. this message appear systematically for the same libraries. It is not random at all.

i've seen this in google : https://github.com/grke/burp/issues/687 but with no help.

i will add some printf today to track if the FILE object has a problem

vtorri commented 4 years ago

don't you think that, lines 57 and 59 of check_msg.c, send_file1 and send_file2 should be defined to NULL ?

it does not change anything, though

brarcher commented 4 years ago

Static variables in C are auto-initialized to 0. Both of those pointers will start out as NULLs by default.