Hello, I think it would be better to keep them for gcc at the place they are ... gcc is sadly a bit picky about the place for it ... as VC is too. But why not using macro specific for gcc, and another set for VC, which are placed at their most beloved places? Btw great that you try to port winpthread for VC :) Cheers, Kai Am Fr., 27. Nov. 2020 um 16:55 Uhr schrieb Long Nguyen kurumigaming@users.sourceforge.net: [bugs:#866] winpthreads: WINPTHREAD_API after type name causes errors in MSVC Status:...
Hello, fread actually returns a size_t. So maximal size of read per attempt is on 32-bit 2^32-1, and on 64-bit 2^64-1 bytes. If you want to process bigger data, I would recommend to operate here in junks. The maximal read bytes by the streaming API depends on the used open() variant for the file-descriptor. That is indeed a bit annoying. So we provide here an alternative for fopen(). You could try to replace fopen-call by fopen64()-call instead. See also there is the fsetpos64, fgetpos64, _fseeki64,...
Hello, Sorry for telling you, but your assumptions about passing va_list as argument, and how it behalfs is plain wrong. So your test-code is invalid. Why you assume that a local variable va is modified under the hood by a different function? As long as you don't pass reference to it, you are not able to modify its contents for an outer function. int foo(va_list argp) { return va_arg(argp, int); } void zoo(const char *fmt, ...) { va_list argp; argp=va_start(argp, fmt); fprintf(stderr, fmt, foo(argp),...
Hmm, sorry. I mixed your report up. There was another report with code sample, which claimed that va_list would be broken. Sorry about that. Nevertheless you should report this to gcc people too. As it is more a target-library issue in gcc AFAICS. Regards, Kai Am Mo., 28. Sept. 2020 um 15:27 Uhr schrieb Brecht Sanders brechtsanders@users.sourceforge.net: @ktietz70 I'm sorry, but I'm not following where you think this wrong assumtion was made. Is this in both gcc and pkg-config source code? Or are...
Hello, Sorry for telling you, but your assumptions about passing va_list as argument, and how it behalfs is plain wrong. So your test-code is invalid. Why you assume that a local variable va is modified under the hood by a different function? As long as you don't pass reference to it, you are not able to modify its contents for an outer function. int foo(va_list argp) { return va_arg(argp, int); } void zoo(const char *fmt, ...) { va_list argp; argp=va_start(argp, fmt); fprintf(stderr, fmt, foo(argp),...
Hello, I am pretty sure that our fread/fwrite routines work pretty well. The underlying issue here seems to be the missing use of "binary"-mode on the fopen-call. Not sure what Intel's runtime assumes as default mode on open for fopen, but MS' variant assumes text-mode, if no "b" is within the mode-option. Cheers, Kai Am So., 27. Sept. 2020 um 04:59 Uhr schrieb Sanmayce sanmayce@users.sourceforge.net: [bugs:#855] Possible fread() malfunction of GCC 7.3.0 Status: open Group: v1.0 (example) Created:...
That seems to me like a change to linker-script on binutils. The import/export tables are binutils related. Gcc doesn't produce them at all. As I suspected that nothing like LTO tries to be clever here, that issue should be solvable by the linker script, which should make sure that last element of table is NULL. Regards, Kai Am Do., 25. Juni 2020 um 10:52 Uhr schrieb jpa jpa-@users.sourceforge.net: Thanks to Martin Storsjö / wbs on IRC for some hints: problem is probably in binutils, related to bugs...
Hello, Well, I would not say that diagnostic is wrong here. As for wide-character routine '%s' still represents an array of characters, means here an array of wchar_t. For futher reading please see https://man7.org/linux/man-pages/man3/wprintf.3.html Regards, Kai Am Fr., 19. Juni 2020 um 10:48 Uhr schrieb David Macek elieux@users.sourceforge.net: [bugs:#846] wprintf, swprintf etc. don't check format specifiers vs. arguments on compile Status: open Group: v1.0 (example) Created: Fri Jun 19, 2020 08:48...
Hello, well, you can build shared libraries exporting symbols without the 32-bit ABI's leading underscore ... see here for reference the ld tool's option for more detail. Nevertheless the import-library for such a shared object (DLL) will contain the leading underscores. You will need to use a definition file to create it, or you can link directly to the DLL ... if you have headers, which properly define the export's calling-convetion. Hope that helps Kai Am So., 24. Mai 2020 um 18:18 Uhr schrieb...
Hello, if you want to "convert" a DLL to a static library, there is no easy way but to build it from source. But if you mean to get an import library for an existing DLL, that can be achieved without too much trouble. For the later, use the tool "gendef" to create an ".def" file. See for further details documentation about this tool. You can find it in our repository, or provided by good distributors. Hope this helps Kai Am So., 24. Mai 2020 um 06:15 Uhr schrieb oset jan osetnik@users.sourceforge.net:...
Hello Jerry, well, not sure what those headers are. They seem not to belong to our provided system-headers. Nevertheless you are right that - if the header file exists - you can include it via '#include' C preprocessor statement. I am a bit confused by your expression "include most libraries". If you mean include API definition for a library, well. Otherwise a header is not enough for using a library. You will need to add it to your link command option, so it is used. Regards, Kai Am Mo., 30. Dez....
Hey, The missing library is actually from compiler runtime. You might need to provide those libraries in search path of your application The other chance would be to link libraries static. You can achieve this by passing '-static' option. See for further information linker/compiler documentation. Hope that helps you Kai Matthew Elmer mcmuffin6o@users.sourceforge.net schrieb am Sa., 7. Dez. 2019, 05:31: Update:--I figured out the command: x86_64-w64-mingw32-g++ -std=c++17 -Wall -o However, I am given...
Hmm, I might miss here something, but x64 ABI is actually pretty clear about how aggregates should be passed. They (should) passed by reference. So I don't see that this sample is valid. Actually the function expects a reference to a struct, and not the double value in any register. Am Fr., 15. Nov. 2019 um 15:40 Uhr schrieb LH_Mouse lhmouse@users.sourceforge.net: Please file a bug report at https://gcc.gnu.org/bugzilla/. [bugs:#819] incorrect argument passing for struct{double} on win64 Status:...
Am Di., 6. Aug. 2019 um 12:06 Uhr schrieb Jannick jannick0815@users.sourceforge.net: Hi Kai, Happy to suggest a patch. Just to confirm: Would GetProcessHeap / HeapAlloc / HeapFree be the WIN32 API functions you expect to be used? Regards, J. As crt creates a heap, and we want that arguments remain valid as long as possible TLS-routines might be executed on exit, it would be best to use here GlobalAlloc (well LocalAlloc is actually the same!). Of most interesting is here the point, when this memory...
Hello, this memory leakage is well known. We could have used here instead stack, which would be even worse. As it would allow attacker to manipulate directly on stack with known layout. Anyway, we could use here instead Win32 API to allocate, and free it later by Win32. A patch for this would be welcome. Regards, Kai Am Do., 25. Juli 2019 um 17:29 Uhr schrieb Jannick jannick0815@users.sourceforge.net: [bugs:#809] __tmainCRTStartup: copied argv causing memory leakage Status: open Group: v1.0 (example)...
Hi, of course do we have SecureZeroMemory as define to RtlSecureZeroMemory. See for this winbase.h. The RtlSecureZeroMemory instrinc function is implemented for mingw-w64 within our kernel32 library. So by linking to it, it should work flawless. My tests confirm that. So I am not quite sure how your setup was done, but could you be a bit more specific? Thanks in advance Kai Am So., 21. Juli 2019 um 22:58 Uhr schrieb Kantor Zsolt kantorzsolt@users.sourceforge.net: I just downloaded the mingw GUI installer...
Hi, this just means that nobody has provided a more recent toolchain to our custom toolchain section. You have to understand that mingw-w64 doesn't release binary toolchains. We provide headers, runtimes, knowhow, ... for people to build a complete toolchain (as msys2 does). So yes, it is absolutely sane to use msys2 one, if you work on a windows host. Of course you can use also the cygwin cross-compiler, or any other distribution providing more recent gcc. Hope this helps, Kai Am So., 21. Juli 2019...
Hi, this issue is most like a g++ issue. I assume that destructor code in g++ is done in 8.1 version pretty much for sysv-abi only, and therefore has issues on ms-abi. Of interest is here to isolate the issue to a small (<100 lines of code) test case. As nobody (not even we will download a big project, build it, and then try to reproduce. Btw is LTO used here on built? you could play with building with different optimization levels, or providing a more complete stack trace for it. Eg by using gdb,...
Why so? On setting new object, we release prior object, and assign new one. So there should be a ref counter increase. Is the ref counter increased by the assignment already? Please clarify this patch, thank in advance
Fix fesetenv bug
spelling
Hey, this is actually an interesting question. The answer I can provide to you might not being what you expected, but the story is actually pretty trivial. For SEH unwind information, there are description for all none leaf functions available. Additionally there is unwind information present in that table too So the stack can be easily unwound, and therefore display of backtrace is shown "mostly" proper. For x86 (none table based) backtrace, the algorithm can make use of such a table, and therefore...
Hello Budi, this question is raised frequently. And the answer is always the same. Don't use '/mingw-w64/x86_64-w64-mingw32/bin directory. It has to remain unmodified, and it is absolute necessary. The directory to be used is '/mingw-w64/bin' instead. Here are living the user tools. What a chaintool means is unclear to me too. But I guess you meant 'toolchain'. Later is the common name of a compiler environment and its different applications (assembler, linker, c-compiler, c++-compiler, ....) Hope...
Hello everybody, I notice here is a mixture of terms within this discussion. Gcc itself satisfy calling convention ABI. All other part of MS' ABI might, or might not be compatible to that one of gcc (and llvm?). So the underlying issue is that gcc uses "aligned" vector-instructions for "unaligned" temporary stack variables. The assumption that stack follows vector alignment is a short-cut in gcc, and of course just in specific ABIs true. So I would consider this a bug within gcc, or a misconception...
Hello, that here we use long is by intention. The declaration of this timeval structure is (was) inconsistent c-runtime vs Windows SDK in context of gcc. Therefore we made sure to use underlying base types instead. The use of "long" is mainly caused by compatibility with Cygwin. As for Cygwin this structure has 64-bit members (instead of 32-bit ones as for native Windows). To understand your issue, it would be interesting if you could provide small testcase, and a description of used compiler, and...
Interesting ... yes, that patch looks right. Cheers, Kai Am Di., 1. Jan. 2019 um 15:47 Uhr schrieb Jacob Nevins jtn@users.sourceforge.net: (For the record, this was also reported as Debian bug #863064.) [bugs:#589] Compilation errors in multimon.h Status: open Group: v1.0 (example) Created: Tue Feb 21, 2017 09:02 PM UTC by tobbez Last Updated: Thu Feb 23, 2017 09:40 PM UTC Owner: nobody For the first one it looks like someone renamed the variable but missed one of the instances. In the second case...
Hello you misinterpreted that what you saw. Of couse the main-function is called, and linked. Otherwise the binary couldn't be linked at all. Exisitance of main() (or equivalent) is a strict requirement for a executable. The issue you see is t1he stream flushing. You print something to stdio, Then you call system sleep. Finally exiting the application. It could be pretty helpful to know how you invoke compilation of your little program. I would assume you are using either direct, or indirect the...
Hi, well, any fortran application needs libgfortran runtime. Therefore I assume that fortran library is linked statically here. No idea why that happend, but it seems to me the most obvious cause. Regards, Kai Am Di., 25. Sep. 2018 um 06:41 Uhr schrieb HEMMI, Shigeru hemmi-shigeru@users.sourceforge.net: An executable program, MySomeExe.exe is built from some forran(+C) source files with the x86_64-8.1.0 mingw-w64 tool. I examined shared library dependencies by dumpbin command of MS. The output is...
Hello, \o/ finally after 10 years someone found the bug in msvcrt's getchar() implementation. We are all in your debt for this .... Sorry for kidding here a bit, but of some interesting might be tutorial about use of getchar(). See for example https://www.tutorialspoint.com/c_standard_library/c_function_getchar.htm with sample. Hopr this link will help you to answer your question, Kai Am Di., 11. Sep. 2018 um 18:10 Uhr schrieb Chris Chadwick big10p@users.sourceforge.net: Hi I haven't done any C coding...
Hello Charles, First of all, all of the packages above should run on Windows 10. There is no specific Windows 10 version. Our crt/runtime is backward compatible until Windows XP. As you are using a more recent Windows version, there shouldn't be any problems for you. The differences between those packages are just about different feature settings. i?86 means creating x86 32-bit version binaries, when used to compile. x86_64 means creating x64 64-bit version binaries, when used to compile. posix means...
Ozkan, I stopped looking into op's reports ... I think it is save to close it as works-for-me. If we have here real issues, we will get sooner or later hopeful a report by a more responsive user.
Well, the problem is that for new created threads we don't set the floating point environment. Even worse, we let msvcrt do the wrong thing (which resets it to its own settings). By using winpthread with recent fix, this issue is resolved for all cases you are using pthread API to create the thread, but not in general ... It might be a way to use our TLS routines in an executable. The problematic part is here that our code is used in DLL, which is used in a VC executable (or the other way around)....
n<=-0.5 for rounding doesn't work for -0.5 only for -0.6. <= interpreted as <
Please use "const char *" for quote. I will commit after this change. Thanks, Kai
Thanks Ruben. Please apply. Cheers, Kai Am 04.06.2017 10:44 schrieb "rubenvb" rubenvb@users.sf.net: Adding comments like in the attached patch makes GCC not emit the warning here. Attachments: patch.txt https://sourceforge.net/p/mingw-w64/bugs/_discuss/thread/a664a507/eb87/attachment/patch.txt (871 Bytes; text/plain) [bugs:#616] https://sourceforge.net/p/mingw-w64/bugs/616/ tools/gendef compilation error with gcc 7* Status: open Group: v1.0 (example) Created: Sat Jun 03, 2017 01:29 PM UTC by Michel...
2017-05-29 15:00 GMT+02:00 George Jackson netbeansfan@users.sf.net: Is this an active forum? Are there any moderator monitoring any post? Is there anything I have missed or am I posting to the wrong forum altogether? I like to continue using MinGW-64 but may need to look at other product if no community support is available. Any assitance or guidance would be much appreciated. Thanks, George Hello George, that gdb issue is something I can't reproduce, and I assume other people on this forum can't...
Well, you would need build ( and to port - I guess) the library ubsan (-lubsan). If you can manage this, the option should work. The sources of this library can be found in gcc's repository AFAIR. Regards, Kai 2017-05-04 5:29 GMT+02:00 Nicholas Welna nwelna@users.sf.net: I am attempting to use -fsanitize=undefined as a flag in a C++ project I am compiling using MinGW-w64, but it doesn't seem to work, it just errors out: g++ ShipmentMaker.o ShippingSimulation.o VesselEvent.o Port.o Event.o Shipment.o...
Good catch. Thanks
In general we don't care about ordinals pretty much, as long as there real names...
Yes, I use this first time for mingw-w64 :). I reviewed. and merged it already. Should...
Hi, 2017-04-11 17:32 GMT+02:00 Tim Hutt timmmm@users.sf.net: Hi, Are there any instructions...
libgcc is part of the GCC project. So you can find its sources either by gcc's project...
Avoid use of declspec(nothrow). Instead use __...
Replace __declspec(noreturn) by __MINGW_ATTRIB_...
Gendef doesn't add here the entry to DATA. That was done manually, and by intention....
Again, ... please stop to ask on bug forum about your lack of reading up API. Ask...
fgetc() feeding us extra characters sometimes
Patch looks sensible to me. Please go ahead and apply it to master. I guess this...
No idea. Sadly I don't have time to look into this. Debugging map_va doesn't reveal...
Hello Ruslan, I added you as member to the mingw-w64 project in the role of a developer....
Hello Ruslan, contributors are always welcome :) 2017-02-21 18:39 GMT+01:00 Ruslan...
First, thanks for your patch. There is no "contribution guide". Nevertheless we have...
it is about rand(). There is no "random device" on Windows. So libstdc++ tries to...
Hmm, I think gcc 4.6 won't be fixed here. In general this isn't a bug from our POV....
64-bit target windows compiler for sjlj,dwarf missing
No, it is not missing. There is no dwarf unwinding for 64-bit, and there won't be....
again, no. 64-bit has 128-bit integer scalare support by default. Again, please don't...
support -m128-bit-int
add 64-bit compiler
No. please don't use bug-tracker as platform for your questions. Use mailing list...
OPEN bug in gFortran 5.1.0
Why does gfortran give segfault error when trying to replace file?
Patch is ok. JonY could you please take care about it? it might be something for...
Fortran - segmentation fault
Hello Rudy, thanks that you worked on gendef tool. It would be helpful, if you could...
Hello Martin, thanks for pointing us on this. There is a regression for sqrt on values...
Hello Bill, your issue is a pretty common one. It is related to the "default mode"...
Hello, we had (and still have) some strong need in improving speed of winpthread....
Hello, I guess this is related due 64-bit vs 32-bit time_t issue. I guess that boost's...
Hello Eckard, I don't get actual what you mean here. Our winpthread isn't released...
Thanks, done.
compilation error vss api, vss.h (vswriter.h vsbackup.h)
Well, as long as the DCOM interfaces, which you are creating, are present on your...
Hi, thanks for working on this. I don't want to loose here the implementations we...
well, by looking through social networks, it seems to be that default parameter is...
Information to be found on https://msdn.microsoft.com/en-us/library/windows/desktop/aa382684(v=vs.85).aspx...
Hallo, the NLS support is disabled by a lot of precompiled toolchains. This has different...
It might be an solution to add to compiler the facility to "normalize" file names...
Oh, I hadn't a closer look to it. Indeed, we are not responsible for this, and won't...
Hi yes, this is a common issue. thanks for pointing it out. Patch is ok for conmit....
Yes, I agree that this code-change should be reverted. A patch checking, if this...
Hi, good to hear that you found a work-a-round. I had a first glance on this issue,...
CentOS is using here the option '--enable-threads=posix', which is the reason for...
No option to disable pthread?
As it isn't something related to mingw-w64 itself, and is just related to provider...
pthread dependency is introduced by toolchain-builder, not by miingw-w64 itself....
well, so you are mistaken. The difference is that handling of printf-formatters don't...
Hi, this is clearly a compiler-feature. Of course it would be of interest to support...
wprintf format check attribute
The timespec structs aren't supported in stat
Hi Jason, this issue is not solvable from our POV. We have to declare the stat-structure(s)...
strerror_r isn't implemented
Well, I would vote for an implemenation in the same way as we provide some other...
pthread_getaffinity_np and pthread_set_affinity_np aren't implemented
Hi Jason, yes we could use 'SetThreadAffinityMask' API to implement it. Of course...
Hi Jason, well, for Windows version >= Vista we could provide such a function as...
The link system call isn't implemented
Hi Jason, this issue is one of those you show that you have a misconception about...
ino_t is only 16bit
C99 'z' format modifier not implemented correctly